There are various commands used in command prompt that can simplify our tasks. Let's know about each of them in detail.
As
we all know that the command line is used to give instructions to the processors
and that’s-why sometimes we call it command processor. Command Line Interface
is the base of any operating system. In Linux kernel there is also the command
processor available named as terminal.
First
of all, we need to know that, we have option to open the command prompt with
administrative rights and without administrative rights as well. In the
administrator rights some more advanced features are included to run the
commands with advanced permissions whereas non-administrative rights do not
have advanced permissions. we can open the command processor with
administrative rights by right clicking on command prompt application and
selecting Run as Administrator. see below:
![]() |
Today
we are going to learn commands to performs some operations using command prompt
in windows one by one.
1). cd command
– cd command is one of very much used and popular command in both the linux as
well as in MS-DOS. But in window there is alternative to this command i.e.
‘chdir’, the cd command means change directory and work of this command is to
change the directory to given directory path.
To use this command syntax is ‘cd pathname’
or ‘chdir pathname’, here pathname is the destination directory. see in image.
1
2). echo
command – echo command is again common in both windows and linux kernel. The
function of this command is to return the output and print it on screen i.e.
stdout (standard output). Basically in shell scripting language echo is a
function to print output.
The syntax for this command is “echo String”
we want to return. see image.
3). copy
command – copy command is used to copy a file or folder (directories) from one
directory to the another directory. The syntax for this command is ‘copy source
destination’, where source is the source file or directory we want to copy and
destination is the final directory where we want to keep the copy of source
file or folder.
4). move
command – move command does works like the copy command but it moves the file
from source to destination and remove the file in source folder while in the
case of copy the file remained in the source directory. The syntax for using
this command is ‘move source destination’. see in the image below.
1)
5). del
command – delete command is used to delete the files or folders using the
command prompt and this is very straight forward basically, what happens in the
background is these commands are run when we press the buttons or shortcut keys
to delete something. See in the image below I am going to delete the same
hello.txt file that I moved using previous command. And the syntax will be like
‘del file’, here file is the filename in our case it is hello.txt. see in the
image and observe.
We can clearly see that the file earlier was present in
the directory has been removed now.
6). cls
command – cls command is used to clear the stdout i.e. the command screen.
Sometimes we keep on writing many command and due to this screen get full of
commands and it is recommended to clear them on time to time. The syntax is
very easy just write ‘cls’ and hit enter key on the keyboard. See the image below and observe.
|
*Note – Keep in mind that the tasks we
perform using the delete keys, copy and cut files, etc. are just the GUI
process of the same basic commands mentioned above. So these commands can be
used to create a set of instructions and later on used in programs.
These are some basic commands I discussed can
be used to perform some basic tasks using the command processor and in later
blogs I will for sure discuss the other advanced commands.
Stay Tuned!!


0 Comments
If you have any doubts, please let me know.