DOS commands

12,458 views 26 slides Apr 23, 2020
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

the following PPT explains different DOS COMMANDS.


Slide Content

BOOTING PROCESS The process of switching on the computer is referred as booting of the computer. The disk from which startup or booting is done is called bootable disk or startup disk or system disk.

DISK OPERATING SYSTEM MS DOS is a single user operating system. It is a CUI based OS. The first version of DOS is called PC-DOS Its prompt to enter a command appears like C:/> _

How to operate DOS? Step 1: click on start button. Step 2: choose All Programs option Step 3: click on MS-DOS option. (OR) click on start button and select Run option. A Run box appears. Type command or cmd and click on enter.

DIRECTORY AND FILE Directories are group or collection of files. Files are the primary unit of storage on the computer. A file is a collection of text or data stored on a storage device such as floppy disk or hard disk.

NAMES FOR DIRECTORIES AND FILES A name is given for every file or directory that we create in computer. When we give a name for the file, it can be divided into two parts. The name shall not exceed 11 characters. The extension name describes what type of file it is, i.e. batch, text, executable file, etc.

The first name and second are separated by a dot. For example, if the name is radha.exe , here radha indicates primary file name whereas exe is the extension name which indicates executable file . If we give wrong commands, a message will be displayed on the screen like “bad command” or “bad filename”.

DOS COMMANDS

The DOS commands can be divided into two types : Internal commands : These commands are automatically loaded into computer memory as and when we switch on computer. They are always available for use. External commands : These commands are stored in special files which are kept into memory before the execution of commands. These commands are loaded into the floppy.

INTERNAL COMMANDS The following are the important internal commands in DOS: DIR It shows all the directories and files. For example, to check files and directories in C: drive, type DIR and press enter key from the key board. The DOS screen shows all the directories and files in the computer. Syntax- C:\> DIR

Different forms of DIR commands: Dir/P : it shows the commands page wise. Dir/W : this command shows the files width wise. Dir *.txt : this command shows all the files with extension of ‘txt’ where * denotes all files.

2. MD (Make Directory) This command is used to create a new directory. For creating a new directory, the following syntax is used: Example: if we want to create a “college” directory, then type the command In order to see the created directory, type: Syntax: C:\> MD Name of the directory C:\> MD College C:\> DIR

3. CD (Change Directory) This command is used to change a directory. Example: If we want to change the directory to “college”, we type the command: Output: This means that now you are in “College” directory. Syntax: C:\> CD (directory name) C:\> CD College C:\ College>

4. Exit from directory This is used to exit from existing directory. Example: If we want to exit from an existing directory of “College”, we have to give the command: The two dots (..) must be placed at the end of CD. Output: Syntax: C:\ existing directory> CD.. C:\ College> CD.. C:\>_

Creation of sub-directories A number of sub-directories may be created under a particular directory. Firstly, CD command is used to go to the main directory. Example, if we want to create a sub-directory “Bcom” under the main directory “college”, then: C:/> CD college C:/college> MD Bcom

5. COPY CON This command is used to create individual files. Example: suppose we want to create a file “radha”, then type, The file “radha” is created and we can type the matter in that file. Saving the file: press ctrl + z keys to save the above file. A message will be displayed Syntax: C:\> COPY CON Name of file C:\> COPY CON Radha Radha is a good girl. She attends computer classes regularly. Ctrl + Z 1 file copied

6. TYPE This command is used to see the details or information in the existing file. Example: To view the contents or information of the existing file “radha”, then type, Syntax: C:/> TYPE name of file C:> TYPE radha

7. COPY This command is used to copy contents of one file to another. Copy creates a duplicate file. Example: If we want to copy contents of radha file (source file) to krishna file (target file), then; To copy from one disk to another disk : To copy one file to floppy disk : Syntax: C:/> COPY source_file target_file C:/> COPY radha krishna C:/> COPY *.* A: C:/> COPY A: C:/> COPY radha A:

8. Ren (rename) This command is used to change the name of existing file. Example: if we want to change the name of the file “radha” to “ sita ”, then: After this command is executed, the file “radha” no more exist. Instead it is replaced with the file “ sita ” now. Syntax: C:/> REN old_file_name new_file_name C:/> REN radha sita

9. DEL (delete) This command is used to delete the unnecessary files from the computer. To delete a file, the following command is used: Example: 1) if we want to delete the file “ sita ”, then type; 2) In order to delete the files starting with a particular character (say S ), then type; Syntax: C:/> DEL name_of_file C:/> DEL sita C:/> DEL S*.*

10. RD (remove directory) This command removes the directory which is empty. In order to remove the directory after removing all files from it, we use RD command. NOTE: first we have to delete all the files and subdirectories under the concerned directory. We cannot remove a directory unless we remove all the files from the directory. Syntax: C:/> RD directory name

11. Date : This command gives the current date. Then computer will display the date as 12. Time: this command shows the current time. Syntax: C :/> date Current date is: 18-07-2016 Enter new date: dd-mm- yy Syntax: C :/> time Output: Current time is: 10:30:25:5 Enter new time:

13. CLS (clear screen): this command is used to clear the screen. 14. Ver (version): this command shows the version of DOS which we are presently using. 15. Exit: to exit from DOS command, we have to use this command. Syntax: C :/> cls Syntax: C :/> ver output : C :/> MS-DOS version 6.22 Syntax: C :/> exit

The following are the external commands: Format: the process of making a new disk ready for use by the computer is called formatting. 2. Label: to give a name to the floppy disk. 3. Diskcopy: this command copies the contents from one disk to another. EXTERNAL COMMANDS Syntax: C :/> format A: Syntax: C :/> label A: Syntax: C :/> diskcopy sourcedisk targetdisk C:/>diskcopy A: C:

4. CHKDSK(CHECK DISK): to scan the contents of a disk drive with a view to check for errors. 5. Tree: this displays all the directories, sub directories and files in a tree form. Syntax: C :/> chkdsk drivename Ex : C:/> chkdsk C: Syntax: C:/> tree

6. Wild cards: this is an important external command which is used to get a file having the same extension. we use asterisk * or question mark ? For wild cards 1. It gives the filenames having extension bat. 2. all files starting with letter k 3. it shows files of a single letter with a bat extension C :/> Dir *.bat C :/> Dir K*.bat C :/> K??.bat

7. undelete: this command is used to restore the deleted file. ex: to restore the deleted file “radha” we type 8. Find: this command is used to search a file Syntax: C :/> undelete filename C:/> undelete radha Syntax: C :/> find filename C :/> find radha
Tags