Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个网络摄像头,它通过重新上传相同的文件并每 10 秒覆盖一次来工作。我想创建一个 shell 脚本来监视这个文件(camFile.jpg),当它检测到它被覆盖时,它会复制它并创建一个名为 camFile-TIMESTAMP.jpg 的新文件。谁能指出我正确的方向?
我认为最好使用 inotify 为您服务。但这取决于您使用的是哪种语言。
http://linux.die.net/man/7/inotify