Return to Snippet

Revision: 3196
at June 17, 2007 17:11 by zingo


Initial Code
function cl () {
 case $1 in
  -*) local o=$1; shift;;
 esac
 cd $* && ls $o
}

Initial URL
http://cutup.org/anize/?bash_tricks

Initial Description
for .bashrc, a function that cd's to a directory and lists the contents it takes ls arguments and a directory. for example, cl goes to home dir and lists contents. cl -l goes to ~/ and long lists contents. and cl -lrt public_html shows the contents of public_html in long list reverse time order.

Initial Title
cd's to a directory and lists the contents

Initial Tags
Bash

Initial Language
Bash