Watch a folder or file with inotify-tools

Linux
Author

Vinh Nguyen

Published

June 2, 2011

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.