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.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments