As a developer command line is a crucial skill to have. So, in this article, I’ll share the top 10 command line command every developer should know.
Let’s get started.
*If you prefer video then check it out: *
Make directory. With this command, you can create a folder easily
After creating a directory/folder we need to go to that directory. We can do so with cd
The next one is cd ../ this command used to go one step back. For example, if you are inside “folderA” and it’s on the desktop. You can use this command to go back to desktop.
So, you created a directory/folder now you want to delete it. You can do so with this command
We need to create files a lot. we can do that easily with this command.
this command will create a .html file. when creating a file don’t forget to add the extension.
If you want to see how many folders and files a directory have. You can use this command to see. All you need to do is go to that directory and run this:
With this command, you can move a file to another directory. You need to provide the file name and the directory you want to move the file. like this:
mv file.txt moveTo
With is the command you can delete a file and a folder. When you want to delete a folder with this command just add an -r flag at the end.
// remove file rm file.text //remove directory rm folder-name -r
This command is a fun one. It just prints out today's date, just for fun.
This command print out the current directory you are in.
Working with the command line makes a programmer's life a lot easier. If you don’t use the command line, I highly recommend starting using it.
If you enjoyed reading this article, I think you’ll also enjoy my newsletter where I share my articles and videos, and resources I found online.
connect with me on Twitter at coderamrin