Search code examples
linuxevent-handlinginotifyinotify-tools

How can I use inotify-tools to have an email sent to me when a file in a directory has been added?


Users sometimes add files to a directory on a linux server. I was looking at ways to be informed when a file has been added to this directory. I found inotify-tools:

https://github.com/rvoicilas/inotify-tools/wiki/

But I am not too sure how to go about using it. I can't seem to find a proper documentation on it.

I would appreciate it if anyone with experience in it could guide me.


Solution

  • With inotifywait you can do what you want, check the manual page.