当文件在文件夹中移动时自动触发 bash 脚本的最佳方法是什么? (我在Linux环境下工作)
我不想使用每分钟检查我的文件夹的 cron 作业。
尝试使用 inotify-tools 或更改文件。这些程序可用于监视文件系统事件并对其采取行动。
https://github.com/rvoicilas/inotify-tools/wiki http://fileschanged.sourceforge.net/