Disk Operating System (DOS): Internal and External


Disk Operating System


1. Disk Operating System (DOS)

ØIntroduction
ØMost Useful Commands of Dos
ØInternal Commands
ØExternal Commands

2. Introduction
DOS is the first operating system ever used. It created by IBM Microsoft. 
It was the simplest Operating System. It suited the requirements of the system of 
those times perfectly well. It was the most popular operating system.
 It has somedisadvantages as

It is little difficult to learn.
 It is mot suited to fulfill the need of multi tasking and multi processing.

 It is necessary to learn DOS because-
When WINDOWS fail to respond, the only way to boot the system is through DOS.
  The windows operating systems till windows-95 are based on the top of DOS.

System customization with writing batch files and autoexec files is only possible through
DOS.
3. Most Useful Command of DOS
The command set of DOS is divided between internal and external commands. The
commands
which are run within the system are called internal command and the commands which
create a dialogue with other peripherals like floppy drive, printer, plotter etc are called
external commands. 

4. Internal commands
CHKDSK  [drive:] [\F\V]

  If the drive is not specified, the processor assumes that it is the current drive. The square
bracket indicates that it is optional to specify the parameter. The /F /V are also optional. The /F
option corrects in the directories and file allocation table and /V provides messages of status of
progress in checking the disk and errors encountered.

  This is Check Disk command. This command analyzes the disk and memory and produces it’s
status. Also it gives a list of directories and file allocation table on the specified drive. It gives
the no. of bytes used up and no. of bytes free. It is recommended to run this command
periodically to check for errors and available free space.

The example for this command –

CHKDSK C:  <enter>

After executing the command, the screen would show the output as-
  
CHKDSK has NOT checked this drive for errors.
Volume Serial Number is 274F-12DD

1,021,886,464 bytes total disk space
  607,334,400 bytes available on disk

4,096 bytes in each allocation unit
249,484 total allocation units on disk
148,275 available allocation units on disk

655,360 total bytes memory
574,240 bytes free

The character > is called a command prompt. It blinks when it has finished processing and
expects a command from the user. The user can change the command prompt according to his
choice.

  The C:\COREL50\CHART\PICTO is called the path. The command prompt is now in the sub
directory picto. Chart is a sub directory and corel50 is a directory. The character \ is the
separator.

The label of the volume of the memory partition is shown.
Serial number of the memory partition is shown.
Path on the c drive is shown.

  Every directory when created shows the system files. and .. These are hidden files. The
contents of the directory has other sub directories which are shown as <dir> after their names.
The bytes occupied by them and the date and time when they are created is shown. At the end,
the summary as number of subdirectories and the number of files and bytes occupied by them
are shown. Number of free bytes which were allocated to them are shown.

The dir/w shows the contents in wider view. It does not give the date and time of
creation. All the files and directories are seen in a smaller area. The output
typically looks as-

C:\COREL50\CHART\PICTO>DIR/W <enter>

 Volume in drive C has no label
 Volume Serial Number is 274F-12DD
 Directory of C:\COREL50\CHART\PICTO

[.]             [..]            PICTOGR.CCH     PICTO01.CCH
         2 file(s)        114,526 bytes
         2 dir(s)     608,382,976 bytes free

To quit half way between the directory browsing, Control+C can be used. This
works with almost all the DOS commands.

COPY [drive:\ ] filename [drive:\ ] filename
   This command copies the file from specified drive and path. The specification for drive and path is optional. The source file is copied on the destination specified. User can change the name of the file here. If the destination drive and path are not specified, then the file is copied on the current drive and current directory.

If a file by name pictgragr.cch is to be copied, the copy command would be as –

C:\COREL50\CHART\PICTO>COPY PICTOGR.CCH C: <enter>

        1 file(s) copied
   The syntax of copy command is very simple as - copy <source file>  <destination file>. The source file, if it is in directory, subdirectory, the path has to be specified. Similarly, for destination file the path should be given. If the destination is the same as the current path, then there is no need of giving the path. To go to particular directory, subdirectory, the command is change directory which is covered later. The destination file can be given a different name but that is optional. 

RENAME <old filename>  <new filename>
   The rename command renames the old file name with a new name. The contents of the file name are not changed. The old name is not seen in the directory contents. When the command is being executed, no response is visible on the command prompt. But on viewing the contents of directory, the new name is seen.
 MKDIR [ drive:\path ] dirname
   This command creates a directory on the specified drive path. The
specification for drive and path is optional. Whenever any directory is
made two system files. and .. are made. These files are hidden and
cannot be tampered with.
 On giving the command, the screen would be as-
 C:\>MKDIR RAJ  <enter>

The execution of the command mkdir does not show any response. But
the dir command will show the new directory.
 C:\>DIR RAJ  <enter>
  Volume in drive C has no label
 Volume Serial Number is 274F-12DD
  Directory of C:\raj
 .              <DIR>        06-10-94 12:32p .
..             <DIR>        06-10-94 12:32p ..
         0 file(s)              0 bytes
         2 dir(s)     607,662,080 bytes free 

---------------------------------------------------------------------------------
CHDIR [drive:\path ] dirname
   This command changes a directory on the specified drive path. If no path is given, processor assumes it as the current path.
 Execution of the command shows the following response.
 C:\>CD WINDOWS  <enter>
C:\WINDOWS>
 The command prompt which was earlier on C: has changed to C:\WINDOWS.
If you wish to come back from sub directory to the root, use CD\ command. To revert back by one directory, CD.. command is used.
The example will demonstrate-
 C:\COREL50\CHART\PICTO>cd..
 C:\COREL50\CHART>cd\
 C:\>
 The symbol \ shows that separation between directories.

==========================================================
RMDIR  [ drive:\path ] dirname
   This command removes a directory on the specified drive path. The specification for drive
and path is optional. The directory to be removed has to be empty before executing this
command. Also the command prompt has to be out of the directory to be deleted. The execution
of the command will not show any response but on dir command, the directory removed will
not be seen.
Let us remove the raj directory which we have created just now.
 C:\>RMDIR RAJ <enter>
C:\>DIR R* <enter>
  Volume in drive C has no label
 Volume Serial Number is 274F-12DD
 Directory of C:\
 File not found
                      607,559,680 bytes free.
 NOTE: The directory command will refer everything as file but for directory
<dir> will be specified. 

The character * is used to view only those files and directories which begin with alphabet r. The
use of * represents 0 or more than 0 characters. Similarly, ? stands for one single character. Use
of such characters is especially helpful when the directories are very big and they save time in
viewing. These characters are called wild card characters.
 FORMAT [ drive:\path ]
   This command formats a specified. The specification for drive and path is optional. The
format command is necessary to reset the memory. It is used when new hard disk is to be
installed. The command gives information about the damaged memory locations. If used for the
memory which contains information, all information is erased.
Under no conditions, students should try this command except on A drive. 

================================================

COPY CON [ drive:\path ] filename
   This command creates a new file. The specification for drive and path is optional. After the
command is entered, whatever is typed will be saved with the filename. To create a file
successfully, Control+Z  should be entered. Control+C will cancel the command.
 Suppose if a file of name comp is to be created,
 C:\>COPY CON COMP <enter>
I HAVE A COMPUTER WHICH HAS PENTIUM_3 PROCESSOR.^Z
        1 file(s) copied
 TYPE  [ drive:\path ] filename
   This command allows to browse the specified file. The specification for drive and path is
optional. 


To view the contents of the file comp,
C:\>TYPE COMP <enter>
I HAVE A COMPUTER WHICH HAS PENTIUM_3 PROCESSOR.
   Creating new file helps to automate some of the routine activities like copying files from
certain directory to another, deleting old files etc. This is possible when a batch file is created.
Batch file can be created by type command. After the filename is given the file name has to
necessarily follow the .bat extension. To execute the commands written in batch file, full name
of the file has to be typed and should be followed by pressing enter key as usual.  
Example of batch file-

If a batch file by name, Rajcomp is created which creates a directory say bonbon, by keying in
Rajcomp and entering the directory will be created. Once the directory is created, after again by
running the batch file, the message directory already exists appears.
 C:\>COPY CON RAJCOMP.BAT
MKDIR BONBON^Z
        1 file(s) copied
 C:\>RAJCOMP.BAT
 C:\>MKDIR BONBON
 C:\>RAJCOMP.BAT
 C:\>MKDIR BONBON
Directory already exists
   AUTOEXEC.BAT files are created by the same way. When the system is booted every time
this file is executed.

6. External commands
 As defined earlier, the commands which involve peripherals like floppy drive, compact disc drive,
printer, plotter, scanner etc.
 FORMAT [ drive name :]
   Formats the drive. The format command enables new floppies to store data. But the command
should be very carefully used. If the drive is not specified, processor will delete all directories,
files from the current drive. The format command in progress will inform about the status of
progress and also shows the memory bytes available on the floppy. Also user can put his name
on the floppy volume.

COPY [drive: \] filename  [drive: \] filename
  The copy command works the same as the internal command. The message of one file being
copied can be seen on the screen.

The typical example of copying a file on the floppy is-
 COPY C:\WINDOWS\COMP A: <enter>
To change the name the command would be as-
 COPY C:\WINDOWS\COMP  A:ZZ <enter>
 The file comp is copied on floppy drive with the new name ZZ.
   This command copies the file from specified drive and path. The specification for drive and
path is optional. The source file is copied on the destination specified. User can change the
name of the file here. If the destination drive and path are not specified, then the file is copied
on the current drive and current directory.
 Rename command will also work similarly.









Post a Comment

0 Comments