Last active
October 6, 2022 02:34
-
-
Save Borodin-Atamanov/622e1f9af99325011823e606f4cb9c02 to your computer and use it in GitHub Desktop.
How to watch file modifications in Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 16777216 > /proc/sys/fs/inotify/max_user_watches; | |
| echo "@/dev/" > '/dev/shm/inotify.stop'; | |
| echo "@/sys/" >> '/dev/shm/inotify.stop'; | |
| echo "@/run/" >> '/dev/shm/inotify.stop'; | |
| echo "@/home/i/.cache/chromium/" >> '/dev/shm/inotify.stop'; | |
| echo "@/home/i/.config/chromium/" >> '/dev/shm/inotify.stop'; | |
| inotifywait --monitor -e create,modify,move,delete \ | |
| --format '%w%f' --recursive / --fromfile '/dev/shm/inotify.stop' \ | |
| | tee /dev/shm/inoty.txt; \ | |
| cat /dev/shm/inoty.txt | sort -u > /dev/shm/uni-inoty.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment