Posts Tagged ‘checksum’

#!/bin/
#dupfind.sh
#author: myownshadow
#TODO:
#needs find redirecting without for loop (find invokes subshells)
#need a faster , md5sum can be very slow with big files

for ind in `find $1 -type f -print0 | xargs -0 md5sum |sed s/\ /-/g`
do
echo $ind >> .md5list &2>/dev/null
done
cat .md5list|cut -c1-32| sort| uniq -d >> .duplist
for line in `cat .duplist`
do
cat .md5list | grep $line | cut -c35-
done
rm .md5list
rm .duplist
exit

Kullanım:
$dupfind.sh /media/iPOD

Bookmark and Share
Tags: , , , ,

Tags: , , , ,

Switch to our mobile site