Compress the cd, ls -la series of commands
Don't bother typing "cd foo; ls -la" - instead add this to your startup script of preference and just do it in one:
function cl () {
if [ $# = 0 ]; then
cd && ls -la
else
cd "$*" && ls -la
fi
}
Usage: cl [path]
Written by Jude Robinson
Related protips
3 Responses
For me it's very annoying.
Whats happens when you go to directory with 10k files? ;)
over 1 year ago
·
That and the following are my favorite bash functions:
mcd() { mkdir -p "$@" && cd $_; }
This creates a new directory (if it does not exist) and cd's to it.
over 1 year ago
·
I have configured ZSH like this: 'foo; l', which means 'cd foo; ls -l'
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#