#!/usr/bin/perl
use strict;
use File::Copy;
use File::Find;
use POSIX qw( strftime);
my $time = strftime("%Y-%m-%d %H:%M:%S", localtime(time));
my $date = strftime("%Y-%m-%d", localtime(time));
my $logfolder = "/logs/udms/cmback_2_02/";
find(\&filehandler, "$logfolder");
my @file;
sub filehandler {
my $file = $File::Find::name;
if (-f $file) {
if($file=~/udsvr.log.$date/){
push @file,$file;
}
}}
foreach (@file){
print "$_\n";
}
阅读(2213) | 评论(0) | 转发(0) |