You are not logged in.
I would like to watch if a given file is modified and then run a script automatically if any modification occurs. I found the command http://linux.die.net/man/1/inotifywatch but it only collects the statistics and print it out if the interrupt signal is received (Ctrl + C or time elasped).
Offline
No, look at the EVENTS section of the man page: inotifywait can be run in a while loop and will trigger an action if, for example, attrib is set.
Offline
What exactly do you want to do? Maybe e.g. an hourly rsync would be enough?
Offline
I've used incron for this in the past, maybe that would suit your needs a bit better?
Careful tho... I've messed my system up pretty good a few times with this tool...
Offline
I'd recommend incron too, and I haven't messed up my system with it ever. ![]()
Offline
For something more complex with logging, you may want to look into systemd paths directives PathChanged and PathModified.
man systemd.pathOffline