#!/usr/bin/perl
use File::Find;
@directories_to_search = "圧縮したいファイルの保管されたディレクトリのフルパス";
find(\&wanted, @directories_to_search);
sub wanted{
my $file = $File::Find::name;
if ($file =~ /\.gz/) {
} else {
if (-f $file){
system ("/bin/gzip $file")
# print $file,"\n"
if (-M "$file" > 1);
}
}
}
0 件のコメント:
コメントを投稿