微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用shell脚本或python检查目录内容是否已更改

我有一个程序,可以在特定目录中创建文件.
当这些文件准备好后,我运行Latex来生成.pdf文件.
所以,我的问题是,如何将此目录更改用作触发器
使用 shell脚本或 python脚本调用Latex?

最好的祝福

inotify取代了dnotify.

Why?

…dnotify requires opening one file descriptor for each directory that you intend to watch for changes…

Additionally,the file descriptor pins the directory,disallowing the backing device to be unmounted,which causes problems in scenarios involving removable media. When using inotify,if you are watching a file on a file system that is unmounted,the watch is automatically removed and you receive an unmount event.

…和更多.

More Why?

Unlike its ancestor dnotify,inotify doesn’t complicate your work by varIoUs limitations. For example,if you watch files on a removable media these file aren’t locked. In comparison with it,dnotify requires the files themselves to be open and thus really “locks” them (hampers unmounting the media).

Reference

原文地址:https://www.jb51.cc/bash/384235.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐