This is just my own little notepad for jotting down stuff. Perhaps it will be helpful to you too. Shell Scripting: For loops: for file in `ls` do mv $file $file.copy done For loops with limited iterations: i=0 for file in `ls` do let i=i+1 if [ $i -gt 10 ] then mv $file.copy fi If loops in bash: if [ 1 = 1 ] ; then echo "yes" ; else echo "no" ; fi Testing for existance of two command line arguments... if ( ! [ $1 ] || [ ! $2 ] ) ; then echo "yup" ; else echo "nope" ; fi (and yeah, you could just test for $2, but part of the purpose here is to demonstrate boolean operators in if statements...) identd in Mac OS X - in /etc/inetd.con (comment out the other similiar line) auth stream tcp wait root /usr/libexec/tcpd identd -w -t120 Kill all processes with 'foo' in the name. kill -9 `ps aux | grep foo | grep -v grep | awk '{print $2}'` Terminal transparency in Mac OS X: from a shell, execute: defaults write com.apple.Terminal TerminalOpaqueness 0.8 ansi color escape sequences in bash and how to type them! (I am the only person in the world that offers this information): (stand by) To tar a directory: tar -cvf file.tar directory To enable a chroot'd ftp access only account in linux with proftpd: in /etc/proftpd.conf, put the following line: DefaultRoot /home/guest guest ...where guest is the account name of the user, and /home/guest is the path to the dir you want him chroot'd to (his home directory makes a fine choice) Then as root: csch guest ...then enter /bin/deny To provide host-allow protection on an URL (regex savy), into the main config file for apache 1.3 or later, append the following lines: Order Deny,Allow Deny from all Allow from .tribal.org Allow from .blackmagiclabs.com Allow from .blackmagiclabs.org Allow from .blackmagiclabs.net To get Mac OSX's lookupd to consult /etc/hosts before the netinfo db: as root: niutil -create . /locations/lookupd/hosts [hit enter] niutil -createprop . /locations/lookupd/hosts LookupOrder FFAgent DNSAgent [hit enter]