Archive for July, 2010
Remove duplicate files based on md5 hash
Posted by hvera1981 in Linux, Programming on July 27, 2010
OUTF=rem-duplicates.sh; echo “#! /bin/sh” > $OUTF; find “$@” -type f -exec md5sum {} \; | sort –key=1,32 | uniq -w 32 -d –all-repeated=separate | sed -r ‘s/^[0-9a-f]*( )*//;s/([^a-zA-Z0-9./_-])/\\\1/g;s/(.+)/#rm \1/’ >> $OUTF; chmod a+x $OUTF; ls -l $OUTF
http://elonen.iki.fi/code/misc-notes/remove-duplicate-files/
sudo timeout
Tired to type your password everytime?
Edit /etc/sudoers and add the following line
Defaults:user timestamp_timeout=7200
Where user is your username