Please note, you cannot usually get the creation time, because it is not recorded by all file/operating systems.
sub wanted { return unless /\.out$/; my $ctime = (stat $_)[9]; if ($ctime < time()-(2*60*60)) { print "$_ is older than 2 hours.\n"; } elsif ($ctime > time()) { print "$_ has used a time machine to get here!\n"; } else { un#link $_; print "I hate new files.\n"; } }
In reply to Re: Re: Re: File Search
by Beechbone
in thread File Search
by mikevanhoff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |