【发布时间】:2018-03-17 02:18:50
【问题描述】:
有人可以解释为什么inotifywait 仍然报告打开的文件,当我排除打开时?
mkdir /tmp/a
inotifywait --exclude acess,attrib,close_write,close_nowrite,close,open,moved_to,moved_from,move,delete,delete_self,unmount -r -m /tmp/a/
touch /tmp/a/test
/tmp/a/ OPEN test
/tmp/a/ CLOSE_NOWRITE,CLOSE test
我只关心是否创建了新文件或修改了当前文件。
我使用 CentOS 7,如果这有什么改变的话。
【问题讨论】:
-
--exclude用于排除匹配的文件名。它与排除特定事件没有任何关系。请参阅inotifywait手册页。
标签: linux bash centos inotify inotifywait