I need to get alerted when a new directory or sub directory is created within the root directory that I am monitoring. The alert has to be triggered to a PHP file. How do I do this on CentOS? Is inotify the best route to take? I just need to know when a new directory is created and the location. So I am looking for the simplest of ideas to do this.
- I have full control of the server
- I just need to monitor creation of a directory
- Alerts have to be sent to a PHP file (directly or indirectly)
Please send through any ideas you might have.