摘要: #!/usr/bin/perl`find /bak/ >list.txt`;open LIST,"/root/list.txt";while (){ chomp; open TEST,"$_"; if ( -d TEST ){ close TEST; } else{ close TEST; $mtime= -M $_; if ($mtime > 60){ print "$_ old than 60 day!!\n"; unlink $_; } }} 阅读全文
posted @ 2013-10-05 11:49 hydezhao 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/perluse DBD::mysql;use strict;use warnings;use DBI;use utf8;binmode(STDOUT, ':encoding(utf8)');binmode(STDIN, ':encoding(utf8)');binmode(STDERR, ':encoding(utf8)');use Time::Local;my $addtime=time();my $dbh;my ($a,$b,$c,$d,$f)=(0,0,0,0,0);sub getpid{ my $ser= pop @ 阅读全文
posted @ 2013-10-05 11:36 hydezhao 阅读(365) 评论(0) 推荐(0) 编辑