Skip to content

Instantly share code, notes, and snippets.

@isGabe
Last active January 2, 2016 09:49
Show Gist options
  • Save isGabe/8285158 to your computer and use it in GitHub Desktop.
Save isGabe/8285158 to your computer and use it in GitHub Desktop.
mkdir + cd in a single command
# Place this in your .bash_profile, reload .bash_profile
# Type 'mkdircd [new-directory-name]'
# Rejoice
# Found here: http://linux.101hacks.com/cd-command/mkdir-and-cd-together/#comment-4
# I shortened mine to 'mdcd'
function mkdircd () { mkdir -p "$@" && cd $_; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment