I want to run a shell script when a specific file or directory changes.
How can I easily do that?
I want to run a shell script when a specific file or directory changes.
How can I easily do that?
Check out the kernel filesystem monitor daemon
http://freshmeat.net/projects/kfsmd/
Here's a how-to:
Here's another option: http://fileschanged.sourceforge.net/
See especially "example 4", which "monitors a directory and archives any new or changed files".