Log new directories (created in a certain place) in a file


New Member
Hi all!

I need to do the following:

Monitor a certain directory (for example, /media/server/ ) for new directories being created.
If a new directory is created, it should be written in a log file.

The goal is to create a system (using cron), which periodically checks whether new directories are created
and if yes, does some magic to them (this I know how to do).

I checked watch and tail, but failed to do what I want.

$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online