Instead of doing:

mkdir build
cd build


mv build build_2017_03_03
cd build_2017_03_03

What is one command that does both?


There's no built-in command that does this, but you can create a shell function that does it, like this: mdcd () { mkdir $1; cd $1; } You can change mdcd to any name you want. You can create an analogous function for mv + cd as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.