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

MechWright

New Member
Joined
Jun 2, 2020
Messages
4
Reaction score
1
Credits
52
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.
 


You can use auditd for that.
 

Members online


Top