加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-16 01:17:44 所属栏目:安全 来源:网络整理
导读:我有一个程序,可以在特定目录中创建文件. 当这些文件准备好后,我运行Latex来生成.pdf文件. 所以,我的问题是,如何将此目录更改用作触发器 使用 shell脚本或 python脚本调用Latex? 最好的祝福 inotify取代了dnotify. Why? …dnotify requires opening one fil
我有一个程序,可以在特定目录中创建文件.
当这些文件准备好后,我运行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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读