perl 删除过期文件 2015/12/14 14654 #!/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 $_; } } }