0

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.

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

1 Answer 1

0

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.

2
  • And what if it's not a Linux machine? Jun 17, 2011 at 11:59
  • Then we'll think again. :-) I'm betting in this case this is about Linux. Jun 19, 2011 at 18:33

You must log in to answer this question.