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 need your help - using Inotify I am watching a directory for the changes like create, delete, rename and move. I want these event to be logged in a file and I want to run Inotify as a service.

share|improve this question

You need to install incron package. Then, adding new events to be monitored can be done using

incrontab -e

You can add a line to monitor specific directory. The general format is like:

<path> <mask> <command>

Directory path should be specified first, followed by event mask, and finally the command/script you want to execute. You can read man 5 incrontab for available masks and more info.

In your case, you can create a script to log the relevant events.

share|improve this answer

Your Answer


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

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