There is more than one way to skin this cat. Here is one way using the Linux inotify facility
See Linux::Inotify for details
use strict; use warnings; use Linux::Inotify; my $notifier = Linux::Inotify->new(); my $watch = $notifier->add_watch('/directory/to/monitor', Linux::Inoti +fy::CREATE); while (1) { for my $event ($notifier->read()) { print "New file named: " . $event->fullname() . "\n"; } }
In reply to Re: Find the Files added to the directory in Linux.
by Loops
in thread Find the Files added to the directory in Linux.
by venky4289
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |