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 file is modified? I would like to be able to see what all the files modified are in a given time period or receive an alert each time someone modifies a file.

  • Probably the linux audit daemon (auditd) can be used for this. – goldilocks Dec 7 '12 at 18:22

You can use incron for this if your os and filesystem support inotify.

  • I am on RHEL 5.8 -- do have a man page for inotify but couldn't find the exe in the path – amphibient Dec 7 '12 at 18:22
  • 1
    RHEL doesn't ship it, so you need to install it yourself. – Dennis Kaarsemaker Dec 7 '12 at 18:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.