Operating Systems MS-DOS

0

Operating Systems MS-DOS

MSDOS:

DOS stands for Disk operating system and MS indicates that it is manufactured by Microsoft Company. The software has programmes for file management and various utilities and basic I/O operations. For executions, each commands is to typed at the Dos prompt along with required parameters and followed by Enter key to indicate end of typing the command. The computer responds with appropriate response. Some frequently used DOS commands and their responses are briefed below. The details of DOS commands can be studied using DOS HELP.

To Get Help:

Command: help < command name>

Response: Details of the specified command are displayed on the screen.
Note: If help command is not followed by any specific command name, a list of commands is displayed on the screen form which one can select a command, the details of which are to be seen.

To Clear the Screen:

Command: cls

Response: The screen of the VDU is cleared and a blank screen is displayed only a command prompt appears in the top left corner of the screen.

To See/ Correct Date:
 
Command: Date

Response: Displays the current system date and allows the user to correct it by retyping the date in appropriate format.

Viewing contents of a directory:

Command: dir

Response: Displays list of all files and subdirectories that the current directory contains as shown below.

Volume in drive C is DISK1_VOL1

Volume Serial Number is 2126-9AF9

Directory of C:VBB
 
<DIR> 10-30-96 5:00p
<DIR> 10-30-96 5:00p
METSYS <DIR> 03-04-97 2:28 a METSYS
VOC <DIR> 04-15-97 6:34 a VOC
PHONE TXT 9,314 05-14-97 6.34 a PHONE. TXT
MSOF 316,928 11-24-97 11.30 p MSOF.DOC
TMP <DIR>  02-04-97 6.11 p TMP
MET <DIR > 11-06-9610:35 a MET
NETSTEP EXE 9,72812-20-97 3:57 a NETSTEP.exe
CALIB1 16,896 06-23-98 12:26 a CALIB1
4 file (s)  1,001.570 bytes
6 dir (s) 3,768.320 bytes free

The list also displays information about file size in bytes, date and time of creation of the file.

The command can be used with a number of option (Switches) and wild cards. For example, dir /p and dir/w respond with page wise displays or widthwise displays respectively. In width wise displays in wide format. Similarly, dir *. txt displays list of files with . txt extension only.

To Change Working Directory:

Command: cd <name of the dir or path >

Response: The work area is changed form current working directory to the specified directory. For example, at the command prompt c:>, you give a command cd DOS, the work area will be changed to the specified directory DOS and the command promt will appear as c:dos>. In this way, one can move form directory to directory using command cd followed by either name or complete path of the destination directory.

Cd will return you to the root directory, no matter which directory you are in, the command cd.. Changes the work area to its parent directory.)

Creating a Directory: 

Command: md<name of new directory>

Response: A new directory with the specified name is created. For example,md MAU will created  a new directory with name MAU. But , you will not see it, unless you give command dir in the next step. To change to MAU directory you have to use cd MAU command and then you see the prompt c: mau.
 
Deleting a Directory:

Command: rd <name of directory )

Response: The directory whose name is specified in the command will be removed. For example, rd mau will remove the directory mau. A directory can be deleted only when it is empty.  If there is some information in it, in the form of files, the directory cannot be deleted, therefore , if you want to delete a directory, all the files in it should be deleted first. Also, you cannot delete a directory if you are in it. Before you can delete a directory, you must come to its parent directory i.e one level higher than the current directory.

Changing Working Drives:

Command: cd<name of the dir or path>

Response: The work area is changed from current working directory to the specified directory. For example, at the command prompt C:>, you give a command cd DOS, the work area will be changed to the specified directory DOS and the command prompt will appear as c:dos>. In this way, one can move from directory to directory using command cd followed by either name or complete path of the destination directory.

cd will return you to the root directory, no matter which directory you are in. The command cd.. Changes the work area to its parent directory.

Creating a Directory:

Command:  md<name of new directory>  
Response; A new directory with the specified name is created. For example, md MAU will create a new directory with name MAU. But, you will not see it, unless you give command dir in the next step. To change to MAU directory you have to use cd MAU command and then you see the prompt c:mau.

Deleting a Directory:

Command: rd <name of directory)

Response: The directory whose name is specified in the command will be removed. For example, rd mau will remove the directory mau. A directory can be deleted only when it is empty. If there is some information in it, in the form of files, the directory cannot be deleted. Therefore, if you want to delete directory, all the files in it should be deleted first. Also, you cannot delete a directory if you are in it. Before you can delete a directory, you must come to its parent directory i.e one level higher than the current directory.

Changing Working Drives:
 
Command: a:

Response: The working drive is changed to specified drive. For example, if you insert a floppy diskette in a floppy drive and type the comman a:, the prompt will now appear as a:> instead of c:>. Other drive designation like b:, c :,d: can as well be specified in the command as per requirement.

Copying Files:

Command: Copy <Source file> < destination file>
Response: The file specified as source file is copied to the destination file. Two parameter must follow the command copy. The first is the location and name of the file you want to copy and the second is the location to which you want to copy the file you want to copy and the second is the location to which you want to copy the file, or destination. Source and destination are to be separated by a blank space. The source and destination may be complete path for example.

Copy c:dosedit.com c:tmp

Will copy edit.com file from the dos directory to the directory tmp and the computer will respond with a message: 1 file (s) copied.

Wild cards can be used to copy a group of files. For example : copy * txt fruit will copy all the files with.txt extension to the directory fruit.

Renaming Files:

Command: ren < old name > < new name >

Response: Rename the file specified by old name. Two parameters are must. The first is the file you want to rename, and the second is the new name for the file. For example, ren readme. txt teach. txt will rename. Txt as teach.txt. Wild cards can be used to rename a group of files.

Deleting Files:

Command: del < file name >

Response: The specified file will be deleted i.e erased. For example;

del teach. txt

will erase the file teach.txt if the file to be deleted is not in the current directory, then full path of the file must be given. Wild characters can as well be used to delete a group of files. For example,

del*.txt will delete all the files with . txt extension, in the current directory only.

del*.* will delete all the files in the current directory.

Formatting a Floppy Disk:

Command: format a:

Response:

The floppy disk in the floppy drive A is formatted. Any drive A, B or C may be specified as per requirement.

Viewing Contents of a File:

Command: type < File name>

Response: The contents of the file specified are displayed on the screen, if the contents are more than one page, the contents will scroll fast on the screen and the user may not be able to read it. To facilitate pagewise displays following command can be used.

Command: more < (file name)

Response: The contents of the specified files are displayed on the screen pagewise i.e the computer displays the next page.

Note that both these commands only display the information and user is not allowed to modify the information.

DOS Editor:

Dos has a simple text editor using which new files can be created by typing information in to it or old files can be edited.

Command: edit <File name >

Response: The file with the specified name is opened. If it is a new file, a blank screen appears and the user can start typing the text. If it is an ld file, the contents are displayed on the screen and the user is allowed to modify the contents wherever required. This editor has various editing utilities like cut, copy, paste, search etc. along with facilities to save the file through various menus on the menu bar.

Leave a comment