We occasionally enjoygeeking out at the command line, so we love timesaving Terminal shortcuts. Reader the-soup suggests a simple tweak that combines two common commands into one:
ls, switching to a directory and listing its contents in one line.
Here’s a function to change directory and view files at one time, which I do often.
Just paste in .bashrc (Ed. note: .bash_profile for Snow Leopard) and type
cdl directorytoswitchto in Terminal.
Note that this should work with any *nix command line environment, including the Terminal apps in Linux and OS X, or something like Cygwin on Windows systems.