foreach my $dir (@ARGV) {
foreach my $file ( grep { (-M) > 7 } glob("$dir/*.{log,zip}") ) {
print "\nRemoving - $file ...";
unlink $file;
}
}
Note:
It deletes all log/zip files in a directory.
foreach my $file ( grep { (-M) > 7 } glob("$dir/*.{log,zip}") ) {
print "\nRemoving - $file ...";
unlink $file;
}
}
Note:
It deletes all log/zip files in a directory.
No comments :
Post a Comment