Take the tour ×

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.

share|improve this question
Probably the linux audit daemon (auditd) can be used for this. –  goldilocks Dec 7 '12 at 18:22
add comment

marked as duplicate by Gilles, Renan, jasonwryan, warl0ck, manatwork Dec 8 '12 at 16:30


1 Answer

up vote 5 down vote accepted

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

share|improve this answer
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
RHEL doesn't ship it, so you need to install it yourself. –  Dennis Kaarsemaker Dec 7 '12 at 18:25
add comment
