May 2017
Beginner
552 pages
28h 47m
English
The previous script will log create, move, and delete events in the given path. The -m option causes watch to stay active and monitor changes continuously, rather than exiting after an event happens. The -r option enables a recursive watch of the directories (symbolic links are ignored). The -e option specifies the list of events to be watched and -q reduces the verbose messages and prints only the required ones. This output can be redirected to a log file.
The events that inotifywait can check include the following:
|
Event
|
Description
|
|
access |
When a read happens to a file |
|
modify |
When file contents are modified |
|
attrib |
When metadata is changed |
|
move |
When a file undergoes a move operation |
|
create ... |