监视目录的更改 [英] Monitor Directory for Changes

查看:131
本文介绍了监视目录的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像类似的SO问题,我试图监视一个Linux机器上的目录添加新文件,并希望在到达时立即处理这些新文件。任何想法最好的方式来实现这一点?



使用inotify,您可以观看创建文件的目录。


Much like a similar SO question, I am trying to monitor a directory on a Linux box for the addition of new files and would like to immediately process these new files when they arrive. Any ideas on the best way to implement this?

解决方案

Look at inotify.

With inotify you can watch a directory for file creation.

这篇关于监视目录的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆