Email notifications when new directory is created.

Hi Team,

Can you please help me on this, I want to receive an email notification whenever new directory is created under the path /home/data.

Am using bash shell.

We are not sure about the directory name. When ever any new directory is created, scrip should monitor for new directory and trigger an email notification.

For example

Directory =/home/data

When new directory is created called vvv under /home/data

Then:

Mail - s "new directory received"

Thanks in advance. Please help me

Linux has inotifywait. Read about it. It will tell you anytime a directory (or whatever type of file you ask for) is created, deleted, etc. You need to run it with privilege.

Please provide full details of your problem for more help.