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

后端 未结 5 1801
别跟我提以往
别跟我提以往 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 15:11

    inotifywait is exactly what you are looking for: http://linux.die.net/man/1/inotifywait

提交回复
热议问题