Debian9下安裝inotify-tools
apt-get install inotify-tools -y
inotify-tool提供了兩個應用程序,分別為inotifywait與inotifywatch。其中,inotifywait命令的描述和用法如下。
inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %w%f %e' /home
inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %w%f %e' -e close_write,modify,delete,create,move,attrib /home