Yes,
as already stated, the previous
Perl solutions compare the content of the files.
Could you try this
Perl code and compare its performance with your shell script?
Code:
perl -MFile::Find -e'
$d = shift || die "$0 dir\n";
find {
wanted => sub {
-f and push @{$u{$_}}, $File::Find::name;
}
}, $d;
@{$u{$_}} > 1 and printf "found %s in: \n\n%s\n\n",
$_, join $/, @{$u{$_}} for keys %u;
' <dirname>