I would to write a bash script to find duplicate files but I don't want just use md5sum. It means, in addition to use md5sum I want to check my files with cmp command.
I use the command below for finding duplicate files. Right now I need to write a loop and use cmp command for finding duplicates. How can I write a loop and write a bash script?
find . -type f | xargs -I% md5sum % | sort | uniq -w32 -D| cut -f3 -d' '
cmpin addition ofmd5sum? Are you afraid of hash collision ? – Cédric Julien Oct 5 '11 at 12:43