perl 删除过期文件

#!/usr/bin/perl
`find /bak/ >list.txt`;
open LIST,"/root/list.txt";
while (<LIST>){
chomp;
open TEST,"$_";
if ( -d TEST ){
close TEST;
}
else{
close TEST;
$mtime= -M $_;
if ($mtime > 60){
print "$_ old than 60 day!!\n";
unlink $_;
}
}
}
上一篇:fastapi脚手架


下一篇:[BZOJ2223][BZOJ3524][Poi2014]Couriers 主席树