Skip to content

inotify.1

Manvendra Bhangui edited this page Feb 25, 2024 · 3 revisions

NAME

inotify - monitor file system events

SYNOPSIS

inotify [-n] -d timeout [dir1] [dir2] [...]

DESCRIPTION

inotify(1) provides a mechanism for monitoring file system events. Inotify can be used to monitor individual files, or to monitor directories. When a directory is monitored, inotify will return events for the directory itself, and for files inside the directory. inotify(1) uses select(2) on file descriptor returned by inotify_init(2).

inotify(1) can be used under tcpserver(1), to provide file system events, to interested remote clients. When used under tcpserver, inotify can be used without the -n, option. If the socket connection breaks or if the remote client terminates, inotify will terminate.

inotify(1) uses inotify_init(2), inotify_add_watch(2) system calls.

OPTIONS

-n
Do not read stdin for data

-d timeout
With this option, inotify will timeout seconds for select(2)

dir1 dir2
Paths to be monitored for filesystem events

RETURN VALUE

0 if all steps were successful, non-zero otherwise. If any of the steps fail, a diagnostic message is printed.

AUTHORS

inotify(1) has been written by Manvendra Bhangui for Tagrem Technologies Pvt. Ltd.. - https://www.tagrem.com

SEE ALSO

inotify(7) inotify_init(2) inotify_add_watch(2) tcpserver(1), select(2)

Clone this wiki locally