DEV Community

Cover image for Use the command line to become more efficient in your work!
Gabor Szabo
Gabor Szabo

Posted on

Use the command line to become more efficient in your work!

When I teach git or programming in Python 🐍 or Rust 🦀 I always use the command line. 🖳
This is a bit of a shock to most people who grew up in a GUI-based world and who have never seen a terminal.

After the initial shock, they get in general despair when they understand I really mean to use the command line. 🤯

However, there are a number of advantages of using the command line. Let me just emphasize one. Being able to access the history of your commands
and to repeat a previously executed command exactly as it was executed earlier of with some changes. 📜

Even for the most simple task that involves a single file. In a GUI environment you will have to navigate to the file using the file-explorer
or the open widget every time you need that file. Some tools have a menu option to open "recently opened files", but that usually only lists the 10-20
most recently opened files. It won't go back far in the history.

Besides, what if you need to open a file just next to a previously opened files. e.g. you need to open image-42.png after you opened image-41.png.

Some tools (e.g. VS Code) offer you a way to type in part of the name of the file and filter through all the files of the project. Which is a nice improvement,
but most of the tools don't have that feature.

With a command line tool you just press the "Up-arrow" a few time till you reach the earlier executed command, you can then edit the command and open the other file.

Top comments (0)