Quite often I need to perform this two commands:
mkdir abc
cd abc
I am curious whether there is a simple command (or an alias that I can create and use) to do it in one go, like
user@GROUP:~$ mdcd abc
user@GROUP:~/abc$
Is this possible?
Quite often I need to perform this two commands:
mkdir abc
cd abc
I am curious whether there is a simple command (or an alias that I can create and use) to do it in one go, like
user@GROUP:~$ mdcd abc
user@GROUP:~/abc$
Is this possible?
Add this to your .bashrc:
mdcd() {
mkdir "$@" && cd "$@"
}
Logout and login again or start a new shell to make the change.