OS Manuals

/usr/bin/fsnotifywatch

C library and CLI tools providing a simple interface to inotify

From inotify-tools 4.26.275-r0 (os), captured 2026-11-09 by running fsnotifywatch --help (exit 1). permalink

fsnotifywatch 4.26.0
Gather filesystem usage statistics using fsnotifywatch.
Usage: fsnotifywatch [ options ] file1 [ file2 ] [ ... ]
Options:
	-h|--help    	Show this help text.
	-v|--verbose 	Be verbose.
	@<file>       	Exclude the specified file from being watched.
	--fromfile <file>
		Read files to watch from <file> or `-' for stdin.
	--exclude <pattern>
		Exclude all events on files matching the extended regular
		expression <pattern>.
	--excludei <pattern>
		Like --exclude but case insensitive.
	--include <pattern>
		Exclude all events on files except the ones
		matching the extended regular expression
		<pattern>.
	--includei <pattern>
		Like --include but case insensitive.
	-z|--zero
		In the final table of results, output rows and columns even
		if they consist only of zeros (the default is to not output
		these rows and columns).
	-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.
	-P|--no-dereference
		Do not follow symlinks.
	-t|--timeout <seconds>
		Listen only for specified amount of time in seconds; if
		omitted or zero, fsnotifywatch will execute until receiving an
		interrupt signal.
	-e|--event <event1> [ -e|--event <event2> ... ]
		Listen for specific event(s).  If omitted, all events are
		listened for.
	-a|--ascending <event>
		Sort ascending by a particular event, or `total'.
	-d|--descending <event>
		Sort descending by a particular event, or `total'.

Exit status:
	0  -  Exited normally.
	1  -  Some error occurred.

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
Options (18)
OptionDescriptionSource
--fromfile fileRead filenames to watch or exclude from a file, one filename per line.help + man
--exclude patternDo not process any events for the subset of files whose filenames match the specified POSIX regular expression, case sensitive.help + man
--excludei patternDo not process any events for the subset of files whose filenames match the specified POSIX regular expression, case insensitive.help + man
--include patternProcess events only for the subset of files whose filenames match the specified POSIX regular expression, case sensitive.help + man
--includei patternProcess events only for the subset of files whose filenames match the specified POSIX regular expression, case insensitive.help + man
-h, --helpOutput some helpful usage information. (in the manual page but not in --help)man
-v, --verboseOutput some extra information on standard error during execution. (in the manual page but not in --help)man
-z, --zeroOutput table rows and columns even if all elements are zero. (in the manual page but not in --help)man
-r, --recursiveWatch all subdirectories of any directories passed as arguments. (in the manual page but not in --help)man
-P, --no-dereferenceDo not follow symlinks. (in the manual page but not in --help)man
-t, --timeout secondsListen only for the specified amount of seconds. (in the manual page but not in --help)man
-e, --event eventListen for specific event(s) only. (in the manual page but not in --help)man
-a, --ascending eventSort output ascending by event counts for the specified event. (in the manual page but not in --help)man
-d, --descending eventSort output descending by event counts for the specified event. (in the manual page but not in --help)man
-I, --inotifyWatch using inotify (default for inotifywatch). (in the manual page but not in --help)man
-F, --fanotifyWatch using fanotify (default for fsnotifywatch). (in the manual page but not in --help)man
-S, --filesystemWatch entire filesystem of any directories passed as arguments using fanotify. (in the manual page but not in --help)man
-M, --mountWatch entire mount of any directories passed as arguments using fanotify. (in the manual page but not in --help)man
Exit status (2) from the manual page
0The program executed successfully.
1An error occurred in execution of the program.
Examples (1) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.