我有一个带有 xfce 窗口管理器的系统 fedora 15。
我安装了一个 inotify util 来玩。
我想控制在我的工作过程中我的文件会发生什么。我今天使用一个命令来运行 inotify
inotifywait --fromfile ~/list.inotify
该命令可以轻松读取要读取和忽略的文件夹和文件列表。有我的清单(list.inotify)
/home/alex
@/home/alex/Torrnets/
@/home/alex/.pulse-cookie
所以它应该读取我的主文件夹并忽略 Torrents 文件夹和 .pulse-cookie 文件。
它也忽略了 Torrent。但它不会忽略 .pulse-cookie 文件。
有什么解决方案吗?(请不要发布使用基于模式的忽略的解决方案,我想使用具有绝对路径的文件列表)
$man inotify
@<file>
When watching a directory tree recursively, exclude the specified file from being watched. The file must be specified with a relative or absolute path according to whether a relative or absolute path is given for watched directories. If a specific
path is explicitly both included and excluded, it will always be watched.
Note: If you need to watch a directory or file whose name starts with @, give the absolute path.
--fromfile <file>
Read filenames to watch or exclude from a file, one filename per line. If filenames begin with @ they are excluded as described above. If <file> is `-', filenames are read from standard input. Use this option if you need to watch too many files to
pass in as command line arguments.