13Apr/090
How to remove duplicate file
Taken from shell-fu
OUTF=rem-duplicates.sh;
echo "#! /bin/sh" > $OUTF;
find "$@" -type f -print0 |
xargs -0 -n1 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
7Apr/090
Deleting special character files in UNIX
If you're an idiot like me and managed to create a file with special characters like --exclude=*.svn and need to remove it, here's how
rm ./'--exclude\=\*.svn'
Remember don't be an idiot like me