my $usage; #my $limitlog = 1800000000; my $limitlog = 100000; my $workdir="/feste/Verzeichnis/Struktur"; chdir ("$workdir"); my @files=`find . -mtime 1 -type f|xargs ls -t`; if (scalar(@files)!=0) { for my $file (@files) { #print "$file\n"; chomp $file; my @node = stat("$workdir/$file"); #print $node[7],"\n"; if ($file=~/\blog/ && $file!~/\b.gz/ && $node[7]>$limitlog) { $version = $version+1; $usage = "gzip -c $workdir/$file > /feste/Verzeichnis/Struktur/$file"."_#$version.gz"; #system ("$usage"); print $usage,"\n"; $usage = "cp /dev/null $workdir/$file"; #system ("$usage"); print $usage; } } }