Server Fault is a question and answer site for system and network administrators. 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

I've got a client that wants to be notified anytime there are new files in their directory on a shared host. Since the directory is a website, which caches files to a specific subdirectory, we want to be able to ignore changes to that subdirectory.

Is there a tool that can do this already? Or a shell script?

It would be great if the results could be emailed as well.

share|improve this question

migrated from Jun 17 '11 at 9:11

This question came from our site for professional and enthusiast programmers.

Telling what OS you run would help. – jlliagre Jun 17 '11 at 10:19
Yes, this can be done but the implementation is OS, and possibly even filesystem, dependent. – John Gardeniers Jun 17 '11 at 12:00

If possible,, use incron. It uses Linux kernel inotify feature (which basically sends signals to user-space every time some wanted file/directory is altered) and can be configured for example to run a script every time some file or directory is somehow modified or accessed. With incron you can get the alerts in real time.

share|improve this answer
And what if it's not a Linux machine? – John Gardeniers Jun 17 '11 at 11:59
Then we'll think again. :-) I'm betting in this case this is about Linux. – Janne Pikkarainen Jun 19 '11 at 18:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.