[X-Unix] finding duplicate files
Dave Higgins
dhiggins at mchsi.com
Wed Jun 20 12:19:15 PDT 2007
On Jun 20, 2007, at 1:54 PM, Eric F Crist wrote:
> 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; } }'
Love these little one-liners... But, I'm drawing errors when testing
this...
in sh: Can't find string terminator '"' anywhere before EOF at -e
line 1.
in tcsh: -e: Event not found.
The first one, in reply to the OP, works great, though. :-)
Dave.
More information about the X-Unix
mailing list