Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Probably the linux audit daemon (auditd) can be used for this. – goldilocks Dec 7 '12 at 18:22
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
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.