Skip to content

Instantly share code, notes, and snippets.

@mrmoje
Created January 16, 2014 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrmoje/8463787 to your computer and use it in GitHub Desktop.
Save mrmoje/8463787 to your computer and use it in GitHub Desktop.
mkcd : A shell function that will mkdir && cd into a new directory
mkcd () {
mkdir -p "$1" && cd "$1"
}

mkcd

A shell function that will mkdir && cd into a new directory. Invoke like so:-

you@box:~$ mkcd path/to/your/new/directory

Feel free to add it to your ~/.bashrc or ~/.profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment