[X-Unix] finding duplicate files
Eric F Crist
ecrist at secure-computing.net
Wed Jun 20 11:54:07 PDT 2007
On Jun 20, 2007, at 1:47 PMJun 20, 2007, Eric F Crist wrote:
> In case you wanted to know, you could gzip anything that's not
> already gzipped by doing a similar command:
>
> perl -e 'foreach $file ( `find . | grep -v .gz` ) { chomp ( $file =
> $file ) ; if ( -ne "$file.gz" ) { print "gzipping file: $file; gzip
> $file; } }'
>
Sorry to reply to myself, but I'm wrong! the line should be:
perl -e 'foreach $file ( `find . | grep -v .gz` ) { chomp ( $file =
$file ) ; if ( !-e "$file.gz" ) { print "gzipping file: $file; gzip
$file; } }'
-----
Eric F Crist
Secure Computing Networks
More information about the X-Unix
mailing list