1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#!/usr/bin/perl -w
use strict;
use Time::localtime;
use File::stat;
use Switch;
use File::Find;
sub want {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks);
(($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($_));
print ("mtime : $mtime\n");
treat($File::Find::name);
}
sub treat {
my $filename = shift;
print ("filename : $filename\n");
return 1;
}
my @dirs = qw{/usr/local/sbin/Tests};
find ( \&want, @dirs); |
Partager