Watch a folder or file with inotify-tools
Linux
I recently needed to watch a folder for a file. I stumbled on this post and discovered inotify-tools. Using it, I can write a bash script to watch a folder for files, and do things when certain events happen. The "watch" script can be launched at startup by adding its execution in /etc/rc.local
.