10-08-05 10:49 PM
#! /usr/bin/perl -w
# finddups.pl
# Lists duplicates in MD5 sums
# Use with find something -type f -print0 | xargs -i -0 md5sum "{}"
use strict;
$|=1;
my %h;
while(<> )
{ chomp $_;
# print STDERR substr($_,0,70),qq( \r);
my @a=split / /,$_,2;
push @{$h{$a[0]}},$a[1] if @a==2;
};
foreach(keys %h)
{ print join qq(\n),'',@{$h{$_}},'' if @{$h{$_}}>
1;
}
[ Post a follow-up to this message ]
|