Archive

Archive for the ‘Uncategorized’ Category

How to remove duplicate file

April 13th, 2009

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

Uncategorized

Deleting special character files in UNIX

April 7th, 2009

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

Uncategorized

Hello world!

November 26th, 2008

Hello World

Uncategorized