Make a directory and change in to it

$* says to take all the command line arguments and put them together as one string. This is needed if you want to make a directory with spaces in the filename.

mkcd () {
  mkdir -p "$*"
  cd "$*"

Stolen from lifehacker.

Leave A Reply
All content licensed under the Creative Commons License