Chris Wallace wrote:
> 1) a simple util to list all duplicate files in a given dir, based on
> filename/size/etc.
heres a *short 'n crappy* shell script that will run `cmp` on all the
files and print out the files that are have the same content, twice.
just run it from within the directory you want to check, or pass the
directories on the command line.
#!/bin/sh
files=`ls $*`
for i in $files; do
for j in $files; do
if [ $i != $j ]; then
cmp --quiet $i $j && echo "$i and $j are identical"
fi
done
done