1
vote
1answer
630 views

Trigger action each time a file is modified [duplicate]

Possible Duplicate: Can a bash script be hooked to a file? Is it possible to mount a mechanism to a file to perform an action (e.g. mark the change in some log file and such) each time the ...
1
vote
0answers
248 views

How can I make scripts run when a file/directory changes in Linux (like Mac OS X’s launchd)? [duplicate]

Possible Duplicate: Can a bash script be hooked to a file? On Mac OS X, there’s a handy daemon called launchd which (amongst other things) allows you to have scripts run when files or ...
27
votes
3answers
2k views

Can a bash script be hooked to a file?

I want a script to sleep unless a certain file is modifed/deleted (or a file created in a certain directory, or ...). Can this be achieved in some elegant way? The simplest thing that comes to my mind ...