inotifywait(1) General Commands Manual inotifywait(1) (NAME) inotifywait, fsnotifywait - inotify fanotify (SYNOPSIS) inotifywait [-hcmrPqIFS] [-e ] [-t ] [--format ] [--timefmt ] [ ... ] fsnotifywait [-hcmrPqIFS] [-e ] [-t ] [--format ] [--timefmt ] [ ... ] (DESCRIPTION) inotifywait inotify(7) . . . fsnotifywait inotifywait fanotify(7) . inotify(7) . (OUTPUT) inotifywait fsnotifywait . : watched_filename EVENT_NAMES event_filename watched_filename . () . EVENT_NAMES inotify . event_filename . (escape ). inotifywait awk . --csv --format . (OPTIONS) -h, --help . @ . ( ) . . : @ . --fromfile . @ . `-' . . -m, --monitor . . -d, --daemon --monitor --outfile . --syslog . -o, --outfile stdout. -s, --syslog syslog(3) stderr. -P, --no-dereference (symlinks). -r, --recursive . . . . : inotify . inotify . 8192 /proc/sys/fs/inotify/max_user_watches . -q, --quiet . inotify . (fatal). --exclude POSIX ( ). --excludei POSIX ( ). --include POSIX ( ). --recursive . --includei POSIX ( ). -t , --timeout . ( ) . -e , --event () . EVENTS . . . -c, --csv CSV ( ). (space) ..TP --timefmt strftime(3) `%T' --format. --no-newline (newline) --format. --format printf. . : %w . fanotify . %f fanotify . . %e () . %Xe () `X' . %T --timefmt strftime(3) . %0 NUL . %n Line Feed ( ) . -I, --inotify inotify ( inotifywait). -F, --fanotify fanotify ( fsnotifywait). fanotify inotify . . . . fanotify . -S, --filesystem fanotify. (EXIT STATUS) 0 . 1 . inotify (unmount) . 2 -t ..SH " (EVENTS)" -e : access . modify . attrib . . close_write . . close_nowrite . close . close_write close_nowrite CLOSE. open . moved_to . . moved_from . . move . moved_to moved_from MOVE. move_self . . create . delete . delete_self . . . unmount (unmount) . . ..SH " (EXAMPLES)" inotifywait `test`. inotifywait `cat test/foo` . % inotifywait test Setting up watches. Watches established. test/ ACCESS foo httpd . #!/bin/sh while ! inotifywait -e modify /var/log/messages; do if tail -n1 /var/log/messages | grep httpd; then kdialog --msgbox "Apache needs love!" fi done `~/test` . `touch ~/test/badfile; touch ~/test/goodfile; rm ~/test/badfile` . % inotifywait -m -r --format '%:e %f' ~/test Setting up watches. Beware: since -r was given, this may take a while! Watches established. CREATE badfile OPEN badfile ATTRIB badfile CLOSE_WRITE:CLOSE badfile CREATE goodfile OPEN goodfile ATTRIB goodfile CLOSE_WRITE:CLOSE goodfile DELETE badfile `~/test` inotifywait -qmr -e 'moved_to,create' --format '%w%f%0' --no-newline ~/test |\ while IFS= read -r -d '' file do chmod -v a+rX "$file" done (CAVEATS) inotifywait inode . inotifywait . (BUGS) (race conditions) . . inotify . (AUTHORS) inotifywait Rohan McGovern Eric Curtin Radu Voicilas . https://www.openhub.net/p/inotify- tools/contributors/summary . inotifywait inotify-tools . inotify-tools : https://github.com/inotify-tools/inotify-tools/wiki.SH (SEE ALSO) inotifywatch(1), strftime(3), inotify(7) inotifywait 4.23.9.0 2025-09-23 inotifywait(1)