fsnotifywait 4.26.0 Wait for a particular event on a file or set of files. Usage: fsnotifywait [ options ] file1 [ file2 ] [ file3 ] [ ... ] Options: -h|--help Show this help text. @ Exclude the specified file from being watched. --exclude Exclude all events on files matching the extended regular expression . Only the last --exclude option will be taken into consideration. --excludei Like --exclude but case insensitive. --include Exclude all events on files except the ones matching the extended regular expression . --includei Like --include but case insensitive. -m|--monitor Keep listening for events forever or until --timeout expires. Without this option, fsnotifywait will exit after one event is received. -d|--daemon Same as --monitor, except run in the background logging events to a file specified by --outfile. Implies --syslog. -P|--no-dereference Do not follow symlinks. -r|--recursive Watch directories recursively. -I|--inotify Watch with inotify. -F|--fanotify Watch with fanotify. -S|--filesystem Watch entire filesystem with fanotify. -M|--mount Watch entire mount with fanotify. --fromfile Read files to watch from or `-' for stdin. -o|--outfile Print events to rather than stdout. -s|--syslog Send errors to syslog rather than stderr. -q|--quiet Print less (only print events). -qq Print nothing (not even events). --format Print using a specified printf-like format string; read the man page for more details. --no-newline Don't print newline symbol after --format string. --timefmt strftime-compatible format string for use with %T in --format string. -c|--csv Print events in CSV format. -t|--timeout When listening for a single event, time out after waiting for an event for seconds. If is zero, fsnotifywait will never time out. -e|--event [ -e|--event ... ] Listen for specific event(s). If omitted, all events are listened for. Exit status: 0 - An event you asked to watch for was received. 1 - An event you did not ask to watch for was received (usually delete_self or unmount), or some error occurred. 2 - The --timeout option was given and no events occurred in the specified interval of time. Events: access file or directory contents were read modify file or directory contents were written attrib file or directory attributes changed close_write file or directory closed, after being opened in writable mode close_nowrite file or directory closed, after being opened in read-only mode close file or directory closed, regardless of read/write mode open file or directory opened moved_to file or directory moved to watched directory moved_from file or directory moved from watched directory move file or directory moved to or from watched directory move_self A watched file or directory was moved. create file or directory created within watched directory delete file or directory deleted within watched directory delete_self file or directory was deleted unmount file system containing file or directory unmounted