I would like to have a trigger and when a particular file is accessed by some process, I would like to be notified (i.e. a script should be run). If I understand correctly, this could be achieved with inotify
.
If I have a file /foo/bar.txt
how would I set up inotify
to monitor that file?
I am using Debian Wheezy with kernel 3.12 (my kernel has inotify support)