tomafro.net · about · on github · on delicious · on twitter · on last.fm

Tip: Create and move to directory

Before my next post on database indexes, here's a useful little function from the Advanced Command Line peepcode screencast (which I highly recommend).:

# Create and move to a directory in a single command
# Usage: take ~/Projects/tools/awesometer

take() {
  mkdir -p $1
  cd $1
}
Tom Ward · 12th August 2009 · tiny · tip · zsh · peepcode