Timeline for Tool to monitor folder for new files and run command whenever new file is detected
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 4, 2021 at 20:45 | comment | added | xebeche | Depending on the scope consider adding -xdev and/or -maxdepth N to find. | |
| Apr 24, 2018 at 9:54 | comment | added | MKatleast3 | 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. | |
| Nov 20, 2017 at 0:21 | comment | added | SDsolar | 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/… | |
| May 31, 2017 at 4:46 | comment | added | Peng Xiao | Best solution if inotify is not available. I would add -type f to filter out files only. Otherwise the folder will also be returned. | |
| Jun 13, 2016 at 1:29 | comment | added | Farhan | its not realtime. realtime is always best | |
| Dec 26, 2015 at 18:45 | history | edited | Michael Sacchi | CC BY-SA 3.0 | deleted 93 characters in body |
| Dec 16, 2015 at 7:34 | history | edited | Michael Sacchi | CC BY-SA 3.0 | Improved to support filenames with spaces (thx @don_crissti) |
| Dec 14, 2015 at 10:24 | review | Late answers | |||
| Dec 14, 2015 at 10:36 | |||||
| Dec 14, 2015 at 10:09 | review | First posts | |||
| Dec 14, 2015 at 10:21 | |||||
| Dec 14, 2015 at 10:08 | history | answered | Michael Sacchi | CC BY-SA 3.0 |