Last active
March 24, 2023 04:54
-
-
Save artbristol/e626f942b5c236631af7 to your computer and use it in GitHub Desktop.
inotify watch a directory with timestamps
This file contains 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
inotifywait --monitor --timefmt '%F %T' --format '%T %w%f %e' --recursive $1 |
use & to run it on background
inotifywait -m /dir &
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem is that after more than 1 hour, inotifywait won't monitor that directory anymore, I have checked with the command ps -ef | grep inotifywait and can't see it running. How do I keep the service running until I turn it off?