Create a directory and change into it at the same time
My Clippings September 24th, 2009 by System
Automatically pulled from Google Starred
$ function md () { mkdir -p "$@" && cd "$@"; }
How often do you make a directory (or series of directories) and then change into it to do whatever? 99% of the time that is what I do.
This BASH function ‘md’ will make the directory path then immediately change to the new directory. By using the ‘mkdir -p’ switch, the intermediate directories are created as well if they do not exist.
by David Winterbottom (codeinthehole.com)

