How to create a new folder & cd into the created folder in a single command ?

In this post we will show you a quick tip how can we create a new folder and jump into it.

We can use this trick in shell script to automate the scenario.

Lets see how to do it.

Create a new folder named test33 and jump into it

[root@nglinux]#mkdir test33; cd $_
[root@nglinux test33]#

Here $_ uses the final argument passed to last command.

Seems interesting !! Do share your quick tips/suggestions below.

Leave a Reply

Your email address will not be published.