#!/usr/bin/perl use warnings; use strict; for my $file ( </var/opt/xim/syslogs/Syslogd*> ) { if ( -M $file > .5 ) { unlink $file or warn "Cannot delete '$file' because: $!"; } }
In reply to Re: search folder and delete certain files with perl
by jwkrahn
in thread search folder and delete certain files with perl
by ravvles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |