Sample Shell programs



myspace - which of my directories use the most space

cd $HOME
du | sort -n



wipe - clean up editor backup files

rmifexists *%
rmifexists .*% 

rmifexists  *~
rmifexists .*~

rmifexists  *.bak
rmifexists .*.bak

rmifexists  *.BAK
rmifexists .*.BAK
Certainly easier than having to point-and-click each one.

Exercise - Write a recursive wipe.