CMD Commands - Every programmer should know

 

As a programmer, working with a computer means that you'll often find yourself interacting with the command-line interface (CLI), where you can execute a variety of commands to carry out various tasks. The command prompt on Windows is known as Command Prompt or CMD, which can be a powerful tool for programmers to perform a range of operations on their systems without the need for a graphical user interface. In this blog post, we'll discuss some CMD commands every programmer should know with examples.




Change Directory - cd

The CD command is used to navigate through the file system on Windows computers. You can use this command to change the current directory to another directory. 

cd [folderName]

For Example navigate to the C:\Windows directory, type following command:

C:\> cd Windows




List Files(Directory) - dir

The dir command is used to display a list of files withing a specific directory or working directory. 

dir

For example, to display a list of file and folders in C:\Programe Files directory, type following command:

*Program Files is current working directory

C:\Program Files> dir




Create New Folder - mkdir

The mkdir command used to create a new directory in current directory or in a speciafic location.

mdkir [folder Name]

To create a new directory called "Test" in the current directory, type following command:

C:/User> mkdir Test




Rename - ren

The ren command used to rename the files and folders

ren [folder] [newFolderName]

To Rename the Test folder to Test1, tyoe following command:

C:\Users\aruna\Documents> ren Test Test1



Copy Files - copy

The copy command used to copy file from one location to another.

copy [file] [destination]


Delete Files - del

The DEL command is used to delete files in the current directory or a specific location. To delete a file called "example.txt" in the current directory, type the following command:

del [file]




Up to Directory - cd..

This command used to change directory to go one folder up (Back).

cd ..





Display Task - tasklist


The TASKLIST command is used to display a list of all running processes on the system. For instance, to display a list of running processes, type the following command:

tasklist


Test Connectivity – ping

The PING command is used to test the connectivity between two computers on a network. To ping a specific IP address, type the following command:

ping 192.168.0.1

 

Network Information – ipconfig

The IPCONFIG command is used to display the current IP address and other network-related information on the system. To display the current IP configuration of the system, type the following command:

IPCONFIG


In conclusion, these are just a few of the many CMD commands every programmer should know. CMD commands are powerful tools that can save time and make various tasks easier to complete. By mastering these commands, programmers can efficiently navigate the Windows command line and automate various tasks, making their development workflows faster and more efficient.



We will meet again.
Thank You!

Copyright ©️2023 Aruna_priyankara | All rights reserved

Follow me :





forestcodeEra

Hi, I'm a software engineering undergraduate student at SLIIT, eager to learn and grow in the field of technology. With a passion for programming and problem-solving, I am constantly seeking new challenges and opportunities to apply my skills and knowledge. In my free time, I enjoy staying up to date with the latest advancements in technology and experimenting with new programming languages and tools. Through my studies and personal projects, I have developed a strong foundation in software development and am eager to continue my growth as a software engineer.

Post a Comment

Previous Post Next Post