Category Archives: Programing

Find identical files

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 … Continue reading

Posted in Bash | Tagged | Leave a comment

Bash Fork Bomb

The folowing shell-command causes bash to crash. It forks recoursively itself eating up all available system-resources. Have fun… 1:(){ :|:&};:

Posted in Bash | Leave a comment

Bash Magic

Ctrl + A Go to the beginning of the line you are currently typing on Ctrl + E Go to the end of the line you are currently typing on Ctrl + L Clears the Screen, similar to the clear … Continue reading

Posted in Bash, Linux, Mac OS X, Software | Leave a comment

Ruby of wisdom

Hello.rb #!/usr/bin/ruby puts ‘Hello World!” Classes Ruby knows the following classes: Integer Float String Methods A method is something you can do with a class. foo.to_i convert to integer foo.to_f convert to float foo.to_s convert to string Variables Warnung: Variablennamen … Continue reading

Posted in Programing, Ruby | Leave a comment