From http://mac.tutsplus.com/tutorials/terminal/10-terminal-commands-that-every-mac-user-should-know/