DEV Community

John Smith
John Smith

Posted on • Originally published at solrevdev.com on

Navigate into a newly created directory

Today I came across a fantastic command line trick.

Normally when I want to create a directory in the command line it takes multiple commands to start working in that directory.

For example:

mkdir tempy
cd tempy

Well, that can be shortened to a one-liner!

mkdir tempy && cd $_

🤯

This is why I love software development.

It does not matter how long you have been doing it you are always learning something new!

Success 🎉

Top comments (0)