2

Instead of doing:

mkdir build
cd build

or:

mv build build_2017_03_03
cd build_2017_03_03

What is one command that does both?

user1271772
  • 225
  • 2
  • 8

1 Answers1

4

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.