Monday, September 6, 2010

DOS Command

Introduction to DOS:
DOS is an acronym for Disk Operating System which may refer to any operating system but in practice we use MS-DOS. MS-DOS was originally developed by Tim Paterson in 1980. DOS is a 16 bit operating system which supports neither multi user nor multitasking. It has built in limitation of 1MB of memory system called EMSC (Expanded Memory Specification).

History of DOS:
Remarkable development in the field of DOS:

Date    Version    Features
1981    1.0    Original OS for IBM PC & Compatible. Supported only floppy disk drive.

1982    1.25    Supported for double sided floppy disk.

1983    2.0

    Developed for IBM PC/XT Microcomputer. First version to support hard disk drive.
Support for international symbols.
    2.11    Bug corrections.
    2.25    Extended character set support.
1984    3.0
    Appeared at about the same time as IBM PC/AT microcomputer, Support for 1.2 MB FDD & up to 32 MB H/D.
    3.1    Supports for PC-Network.
1986    3.2    Support for 3.5 inch floppy disk.
1987    3.3    Support for IBM PS/2 computer
1989    4.0    Menu driven user interface. Support for 1.44MB F/D & H/D over 32MB.
1990    5.0    Allowed excess to more memory & task switching.
1993    6.0    Including disk compression, Advanced memory & file management & virus protection.
1996    6.22    It is independent Machine which support various computer languages, pipes & I/O redirection, dynamic file allocation.

Introduction to MS-DOS
MS-DOS is a set of programs that manages the flow of information to and from various parts of computer system. Initially, MS-DOS was developed for Intel-based PCs that uses a command line user interface. It was developed originally for IBM PC in 1981; MS-DOS was marketed by IBM in a virtually identical version, called PC-DOS. Like every operating system, MS-Dos shows influence of UNIX; DOS commands for managing and navigating directories, for example, are almost identical to those in UNIX.

IBM and compatible computers uses MS-DOS as the control program. MS-DOS is an upgraded version of the famous operating system called CP/m, an acronym of Control Program for Microcomputers. MS-DOS is one of the most popular operating systems. It has been developed and distributed by Microsoft Corporation, USA. As mentioned earlier, it is a collection of programs mainly used in IBM PC, XT, AT and their compatibles.
   The three main files of MS-DOS are as follows:

IO.SYS
This is the program to handle input/output operations to user devices. It permanently resides in memory as long as the power is on. Even if the user changes the application software this program remains in the memory.

MS-DOS.SYS
This is a program use by application programs. It contains special sub-programs to make common operation easy for the program.

Command.com
This program accepts understand the commands the user enter using the above two files to give the desired result. In other words, it is a command interpreter.

The main features of MS-DOS are:
1.    It is a single-user, single programming environment.
2.    MS-DOS supports both floppy disk and hard disk.
3.    It can co-exist on a hard disk with other operating system, for example Novell LAN.
4.    It supports the hierarchical file system.
5.    It supports the dynamic file allocation.
6.    It supports pipes and Input/output re-directory.
7.    It supports a print spooler.
8.    It supports a variety of language (machine dependent)

Hardware requirement of MS-DOS:
1.    286 Processor required.
2.    RAM at least 640 KB.
3.    Motherboard for processing of command.
4.    Hard disk space up to 4MB.
5.    Keyboard
6.    Monitor(black and white/color)
   
Booting:
Loading of the system files (IO.sys, commamd.com and MS-DOS.com) into the memory by the boot record is termed as booting. There are two types of booting and they are:

Cold boot:
When the computer is at off state and the user puts the switch of the computer, the computer reads its RAM space and searches for the system files of DOS from the disk drive A: and drive C: .As soon as it finds the file; the files are resident to the computer’s memory. This is called cold boot.

Warm boot
When the user is working with the computer and wishes to reboot the computer, i.e. he wants to wipe the program in RAM and presses CRLT+ALT+DEL keys at the same time, the computer searches for system files in disks and loads them into the RAM. This process of booting the computer is called warm boot.

File:
A file on a computer is collection related information, just like file-folder being used in the offices. Each file for its identification has unique filename associated with it. On computers certain conversations are to be followed while giving filenames. Filenames are divided into parts; the first one is called filename and the second one is called an extension. In computer certain rules are to be followed. They are:

For filename:
1.    Character should not be more than 8.
2.    Blank space is not allowed.
3.    Numbers can also be used.

For extension:
1.    Character should be more than 3.
2.    No blank places are allowed.
3.    Both uppercase and lowercase can be used.
4.    Numbers can also be used.
5.    Extension is separated from filename by periods.

 Directory:
A directory is a table of contents for a disk. It contains the names of files, their size, last date of modification and the address of the file to locate where on the file is residing.

Sub-directory:
A directory inside a directory is called a sub- directory. A sub- directory is sometimes called a child directory. The directory that contains sub- directories is called a parent directory.

Root directory:  
While loading DOS into the computer memory, DOS automatically creates the directory called root directory (\).

Disk drive:
A disk drive is a device that reads data from a disk and copies it into the computer‘s memory and writes data from the computer‘s memory into disk drives
1.    Hard disk drive
2.    Floppy disk drive

Volume label:
Each can have a name called the volume label and a number called the volume serial number. MS-DOS displays the disks volume label and serial number above the list of files in every directory. We can change a disk’s volume label by using level LABAL COMMAND.
 
Default drive:
The disks drive, which the computer selects automatically for input/output operation when the user doesn’t specify, is called Default drive.

Path:
A path is the course that leads from the root directory of a drive to the file you want to use. For example; suppose that the drive C: has the following directory:

Wild Characters:
Wild cards are commonly used the quick function on or the execution of DOS commands. The two wild cards used are *(asterisk) &? (Question mark). The wild-cards combination and their meaning are given below:

*      Indicates any filename
. *    Indicates any extension
*. *     Indicates any filename with extension
?     Indicates any one character in filename
:     Indicates any drive to be specified, e.g. A:/>B: or B:/>A;
?/    Indicates options being added, A:/>DIR/P or A:/>DIR/W
?^    Indicates control sign
!    Indicates pipes

DOS COMMANDS:
MS-DOS Commands is a small program that does a specify task or the command that is issued after the DOS prompt (c:\ or a:\)is called DOS command. All MS-DOS commands are at prompt, at such as A>, B>, C>. There are two types of DOS commands.

1.    Internal Commands:
Internal Commands execute immediately because they are built in DOS. Internal commands are the parts of COMMAND.COM file. These commands are the parts of command interpreter files. These commands are called memory resident. They are loaded into the main memory during booting operation. E.g. CLS, DEL., EXIT.

COPY CON:
This command creates a text file in Ms-DOS, which is simply used to store general information.
Syntax: C:\>COPY CON <file name>
    E.g. C :\> Copy con partha
Type the content of the file Press F6 or “ctrl + z” key to save file. Press “Enter”
         
CLS: The full form of CLS is clear the screen. This command clears the screen and positions the cursor at the top of screen.
Syntax: C :/> CLS

TYPE: This command is used to see the contents of a file. It lets us to see what is stored in the file using copy con command.
Syntax: C :/> TYPE <file name> and press <Enter> key.
 E.g. type Partha

DIR: The full form of DIR is display directory. This command is used to display the list of the files and directories in the disks.
          Syntax: C :/> DIR

MD: The full form of MD is make directory. This command is used to create a directory in current dri9ve or directory.
Syntax: C :/> MD <directory name>
    E.g. C:\ MD Nikhil
           
CD: The full form of CD is change directory. This command is used to change the directory either to enter or to come of the directory.
Syntax: C:\>CD <directory name>
E.g. C:\ >CD Pentagon

RD: The full form is directory. This command is used to remove unnecessary directory from the disk. To use this command the directory must be empty
Syntax: C: />RD <directory name>
E.g. C:\>RD Nikhil

DATE: This is also an internal command. This command displays and allows us to change the Current date.
Syntax: C :/> date
       
TIME: This is used to display and change the current time.
Syntax: C :/> time
   
DEL: This command deletes or erases the unnecessary files from the disk.
Syntax: C :/> Del<file name>

COPY: Copy command copies file or a group of files from one location to another.
Syntax: C :/> copy <source file name> <target file name>

REN: The full form of REN is “rename”. This command is used to change or rename the name of file.
Syntax: C:\>REN <old file name> <new file name>
E.g. C :\> REN Pentagon Partha

VER: The full form of VER is version.  This command displays the Current version of DOS.
Syntax: C:\>VER
       
VOL: The full form of VOL is volume. This command displays the Current volume label.
Syntax: C :\> VOL

2.    EXTERNAL COMMANDS:
External commands are stored on the disks as the program files. These DOS commands require corresponding files with the extension of BAT or exe or Com. They must be read from disk before they are executed. E.g. EDIT, DISKCOPY, CHKDSK, MOVE, XCOPY, TREE, MORE, LABEL, ATTRIB, etc.

DELTREE: This command removes the unnecessary directory whether it is full or empty.
           Syntax: C :\> DELTREE< directory name>   
E.g. C:\>DELTREE Partha

SYS: This command is used to transfer the three system files (IO.SYS, MSDOS.SYS and COMMAND.COM) from one disk to another.
Syntax: C:\>SYS <target drive>
E.g. SYS A:

TREE: This command displays the disk free structure. It also shows the sub-directory and files.
Syntax: C:\>TREE

DISK COPY: This command copies all the contents of a disk to another disk.
Syntax: C:\>DISCOPY <source drive> < target drive>
E.g. C :\> DISKCOPY A: E:

UNDELETE: This is command recovers the deleted file or files. It is the reverse of delete command.
Syntax: C:\>UNDELETE < file name >
E.g. C :\> UNDELETE Nepal

MOVE: This command is used to change the directory name or move the file or files from one location to another.
Syntax: C:\>MOVE < old directory name > < new directory name >
E.g. C :\> MOVE chudal A:

XCOPY: This command is used to copy a directory from one location to another. It copies all the files and subdirectories of a directory.
Syntax: C:\>XCOPY < source directory > < target directory >

EDIT: It is used to edit the text file.
Syntax: C :\> EDIT <directory name>
E.g. C:\>EDIT Hero

ATTRIB: It is used to make the file read only and hidden.
Syntax: Attrib<filename>

FORMAT: It is used to prepare a floppy di9sk or hard disk for storage of information.
Syntax: FORMAT A:

CHKDISK: It is used to check the disk.
Syntax: CHKDISK <drive letter>
E.g. CHKDISK

SCANDISK:  it is used to check the file structure, directory structure, file allocation table and also scans the disk surface for bad cluster.
Syntax: Type SCANDISK and wait for a result.

CONCLUSION:
Hence, disk operating system is the program, which helps in the smooth running and operation of the computers. DOS is the program, which controls all the computer equipments and allows checking itself. It also co-ordinates the computer just like the conductor co-ordinates the orchestra. It helps in the control and co-ordination of peripheral devices such as printer, disk, drives etc. It monitors the use of resources of the machine, it helps the application program to execute its instructions, it helps the user to develop programs and deal with any faults that may occur in the computer and informs the user.

Hence, we can conclude that disk operating system is the very essential program of a computer, which serves as a communicator between the user and the computer; it is the first layer of software in a computer system without which a computer cannot work.

0 comments:

Post a Comment