Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • its not realtime. realtime is always best Commented Jun 13, 2016 at 1:29
  • 5
    Best solution if inotify is not available. I would add -type f to filter out files only. Otherwise the folder will also be returned. Commented May 31, 2017 at 4:46
  • 1
    Yep - the -f filename option is great. So then the only remaining question is how to get this to start upon reboot. I am going to use this with my solar plant to os.system("ssh me@mysystem ' ( touch /home/me/alarms/low24 ) '") so then the creation of this file will cause the master computer to use espeak and announce the low voltage. It already sends me an email but since my system already speaks the time at the top of the hour it has all the rest. askubuntu.com/questions/977613/… Commented Nov 20, 2017 at 0:21
  • Even thou this is not a real-time, sleeping just a second is enough for me. Most importantly, this solution can watch newly created folders and files. This is great especially for monitoring Hadoop steps log which create new folders for every new step. Commented Apr 24, 2018 at 9:54
  • Depending on the scope consider adding -xdev and/or -maxdepth N to find. Commented Jun 4, 2021 at 20:45