How to find if there are new files in a directory every 2 minutes in shell script?

后端 未结 5 1806
别跟我提以往
别跟我提以往 2021-02-03 14:11

I have a directory called /home/user/local. Every two minutes or so, a new file is dumped into this directory. I need to check this directory every 2 minutes to see

5条回答
  •  迷失自我
    2021-02-03 14:58

    Set up a cron job that runs a script that takes the current listing and compares it to an older listing stored in a file somewhere.

提交回复
热议问题