我有一个场景,我每天将 .csv 文件上传到特定文件夹 /tmp/data_upload,旧文件被新文件替换。
上传数据后,我需要运行 Python 脚本。为此,我有一个想法来创建一个 cron 作业并监视文件中的更改。我试过使用 inotify,但我对 Unix 域不太了解。我怎样才能做到这一点?
一旦上传文件夹中的文件发生日期更改,我需要执行脚本 test.py,例如 /tmp/data_upload。
automation linux unix inotify cron
automation ×1
cron ×1
inotify ×1
linux ×1
unix ×1