Unix terminal command for creating a directory and moving into that directory in the same command.
Download the mkcd.sh
file and place in a directory. Add the following line to your ~/.bashrc
file (or ~/.bash_profile
if running mac):
. ~/<insert-path-to-directory>/mkcd.sh
When you've saved that, run the following command, or simply restart the terminal (replacing ~/.bashrc
with ~/.bash_profile
for mac):
source ~/.bashrc
To run the program, enter the following command:
mkcd name-of-new-file