What is a command?
- command is a specific instruction given to a computer application to perform some kind of task or function.
- In Windows, commands are usually entered via a command line interpreter like command prompt or recovery console.
- Entering a command incorrectly (wrong syntax, misspelling, etc.) could cause the command to fail or worse.
Internal commands
- These commands are automatic loaded into the memory when operating system is loaded into the memory.
- The command available are all combined together and are stored in Command.com file, which is a executable command file
- These are mostly used command.
General purpose commands
Commands | Description | Syntax |
---|---|---|
CLS | This command is used to clear the screen or wipe out every thing written on the screen. | C:\>CLS |
DIR | Dir command is used for listing files and directories present in the current disk. | C:\>DIR [/switches] |
VER | Version numbers indicates that in which edition we are working on. | C:\>VER |
VOL | It displays the disk volume label and serial number, if it exist. | C:\>VOL |
DATE | Type DATE without parameters to display the current date setting and a prompt for a new one. | C:\>DATE |
TIME | Type TIME with no parameters to display the current time setting and a prompt for a new one. | C:\>TIME |
BREAK | BREAK can be used to enable and disable the breaking capability of the computer. | C:\>BREAK [ON|OFF] |
COLOR | The color command enables users running Microsoft Windows to change the default color of their background or the Windows command line window. | C:\>COLOR [attribute] |
File related commands
Commands | Description | Syntax |
---|---|---|
COPY CON | This command gives the facility to create a new text file. After creating save it pressing "Ctrl+Z". | C:\> COPY CON [Filename] |
TYPE | This command is used to display the contents or text of any file to the display device. | C:\>TYPE [Filename] |
COPY | Copy command is used for copy any file to another location or to copy the files to another directory. This command may also be used for copying any file to another disk with different file name. | C:\>COPY [Source file name] [Target file name] |
REN | This command is used to change the name of any file or directory. | C:\>REN [Source file name] [Target file name] |
DEL | This command is used for erasing any file from the disk. | C:\>DEL [Filename] |
CALL | Enables a user to execute a batch file from within another batch file. | C:\>CALL [drive:][path]filename [batch-parameters] |
ERASE | ERASE is a command used to remove files from your computer's hard drive or other writable media. | C:\>ERASE [File name] [attributes] |
Directory related commands
Commands | Description | Syntax |
---|---|---|
MD | This command allows to create a new directory. | C:\>MD [Dirname] |
CD | Using this we can enter from any directory. | C:\>CD |
CD.. | Using this we can exit from any directory. | C:\>CD.. |
RD | This command is used when we want to remove any unusable directory form our disk. | C:\>RD [Dirname] |
PATH | This command is used for display or sets directories for executable files. | C:\>PATH |
External commands
- External commands are known as Disk residence commands. Because they can be store with DOS directory or any disk which is used for getting these commands.
- Theses commands help to perform some specific task.
- These are stored in a secondary storage device.
Commands | Description | Syntax |
---|---|---|
MORE | Using TYPE command we can see the content of any file. But if length of file is greater than 25 lines then remaining lines will scroll up. To overcome through this problem we uses MORE command. Using this command we can pause the display after each 25 lines. | C:\>TYPE [File name] |
MEM | This command displays free and used amount of memory in the computer. | C:\>MEM [Drive name] |
SYS | This command is used for copy system files to any disk. The disk having system files are known as Bootable Disk, which are used for booting the computer. | C:\>SYS [Drive name] |
XCOPY | When we need to copy a directory instant of a file from one location to another the we uses xcopy command. This command is much faster than copy command. | C:\>XCOPY [Source dirname] [Target dirname] |
MOVE | Move command is used for moving one file or multiple files from one location to another location or from one disk to another disk. | C:\>MOVE [File name] [Path name] |
FC | This command is capable for comparing two set of files and display difference between two files. | C:\>FC [First set of file] [Second set of file] |
CHKDSK | This command is used to check the status of a disk and show the report of result status. | C:\> CHKDSK |
SORT | This command is useful when we want to sort a file. When we run this command the result can be get to display device or file. | C:\>SORT /R [Input file name] [Output file name] |
FIND | The FIND command is used to search a file for a text string. | C:\>FIND "String to search" [File name] |
DISKCOPY | DISKCOPY copies the contents of a floppy disk to another. | C:\>DISKCOPY [drive1] [drive2] |
ATTRIB | Sets the various type of attribute to a file. Like read only, archive, hidden and system attribute. | C:\>ATTRIB [± r] [± a] [± h] [± s] [File name] here r-for read only, a-for archive, h-for hidden, s-for hidden attribute. |
LABEL | If you are not happy with the volume label of hard disk, you can change it. | C:\>LABEL |
FORMAT | This command creates new track & sectors in a disk. | C:\> FORMAT [Drive name] [/S] If you include S it will transfer system files after formatting the disk. |
No comments: