0% found this document useful (0 votes)
147 views12 pages

Disk Operating System

This document provides information about the Disk Operating System (DOS). It discusses that DOS is the oldest type of operating system, loaded from disk drives at startup. DOS is a single-tasking, single-user system with a command-line interface. The document outlines the functions of DOS, including establishing a link between hardware and software by translating commands. It describes the types of DOS commands as internal commands, always available in memory, and external commands stored on disks. Important internal commands like DATE, TIME, DIR, MD, and COPY are summarized with examples of how to use them.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views12 pages

Disk Operating System

This document provides information about the Disk Operating System (DOS). It discusses that DOS is the oldest type of operating system, loaded from disk drives at startup. DOS is a single-tasking, single-user system with a command-line interface. The document outlines the functions of DOS, including establishing a link between hardware and software by translating commands. It describes the types of DOS commands as internal commands, always available in memory, and external commands stored on disks. Important internal commands like DATE, TIME, DIR, MD, and COPY are summarized with examples of how to use them.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

FCIT UNIT-02

DISK OPERATING SYSTEM

INTRODUCTION
▪ DOS (Disk Operating System) is an oldest type of Operating System. Disk
Operating System is abbreviated as DOS.
▪ In computer science, a generic term describing any operating system is system
software which is loaded from disk devices when the system is started or
rebooted.
▪ DOS is a single-tasking, single-user operating system with a command-line
interface.
▪ DOS acts on commands. Because DOS is ready to perform when given proper
command hence, it is also known as Command Prompt.
▪ Commands are certain words of English language or short form of English
words.
▪ The meaning of these word or short form is already known to DOS. Since, DOS
recognized these words and hence acts accordingly. These words and short
forms of the English words are better known as commands.

FUNCTIONS OF DOS
▪ DOS works as an Interpreter which establishes a link between hardware and
software.
▪ It translates the commands given by keyboard and mouse in such a language
that can be interpreted by the computer. CPU processes the messages and gives
result and sends them back in the form of messages which are displayed on the
monitor, which we can follow.
▪ The brain of the computer is in the system unit, it means it contains CPU, hard
disk etc. But all these are operated by DOS. And DOS is operated by those
commands which you type on the keyboard.

DOS COMMANDS
▪ We know that a computer works in the presence of an operating system. MS-
DOS is an operating system which runs the computer.
▪ When an operating system runs a computer system, to establish a link between
the user and the hardware, it provides the facility of instructions for the user
through command interpreter.

PAGE-1
FCIT UNIT-02

▪ MS-DOS provides this facility to users through the commands of two types.
These are – Internal commands and External commands.

INTERNAL COMMANDS
▪ These commands are always available with DOS because these commands are
automatically stored in the memory at the time of booting.
▪ All these commands are collected in COMMAND.COM program file.
▪ Hence these commands are always available, until we switch off the computer.
▪ Therefore we can execute the Internal commands whenever we want to.
▪ A few examples of Internal commands are – DIR, RENAME, COPY, TYPE etc.

EXTERNAL COMMANDS
▪ External commands are short programs which are stored either on floppy disk or
hard disk and if needed, they are executed and stored in the memory.
▪ The examples of External commands are– FORMAT, CHKDSK, PRINT, DISKCOPY etc.

IMPORTANT INTERNAL COMMANDS OF DOS


1. DATE COMMAND
Date command shows the current date and enables you to reset it. Type the
following command for it.

C:\> DATE
In this situation the screen will display like the following picture:

If you don't have to change the date, press Enter key. If you want to change the
date, type it in the form of month-day-year.

2. TIME COMMAND
By Time command, you may show the current time or can reset it. For using it, type
the following command:

C:\> TIME
In this situation the screen will appear like the following picture:

PAGE-2
FCIT UNIT-02

If you don't want to change time, press Enter and if you want to change it, type the
correct time.

3. DIR COMMAND
Dir command is one of the internal and basic commands of Disk Operating System.
It is used to show the list of available files and directories on the disk. It can be used
for the following purposes:
1. Projecting the list of content of the original directory.
2. Displaying the list of the content of some specific directory.
3. Displaying the list of contents of a particular drive.
4. Displaying the list intermittently.
5. Displaying the list in width.
Type the following commands on DOS prompt to display your files on the screen:
C :\> DIR
You will view the list of files and sub-directories in the root directory.

SHOWING THE FILES OF OTHER DIRECTORY THROUGH CURRENTLY ACTIVE


DIRECTORY

Having specified full path after DIR command, you can view the files of other directory
or sub-directory through currently active directory.
To view the list of files of some other drive, suppose you are in C drive and want the
list of directories of A drive, type the following command–

PAGE-3
FCIT UNIT-02

C:\> DIR A :
DIR COMMAND WITH DIFFERENT SWITCHES
We can add switches to display the list in different ways. The DIR command with
switches is as follows -
DIR/AH – Displays the list of hidden files.
DIR/AS – Displays the list of system files.
DIR/S – Lists the directories with their sub-directories and files.
DIR/OA – Lists the directories first.
DIR/ON – Lists the directories and files in alphabetical order (i.e. A to Z)
DIR/O-N – Lists the directories and files in a reverse alphabetical order (i.e. Z to A)
DIR/OD – Lists the files and directories age-wise (older to newer)
DIR/O-D – Lists the files and directories in newer to older way.

4. MD COMMAND
MD command and MKDIR command, both are used to serve the same purpose. These
are internal commands. These are used to make Application Directory or Sub Directory.
For example, if we have to make a directory named newdir on C prompt, we'll type the
same command-
C:\> MD newdir (can use MKDIR in place of MD)
Now, suppose, we have to make one directory, means sub-directory named new inside
newdir we'll give the following commands-
C:\> CD newdir (First we'll enter PRAGYA through CD Command)
C:\newdir> MD new

5. CHANGING THE DRIVE


The computer pays attention to only one drive at a time. If you want your computer to
work on another drive, type the name of the drive followed by the colon symbol.
C:\> A :
The colon mark ( : ) is always written after the drive-letter without leaving any space.
We change the drives only when we have to access the files of some other drive.
6. COPYING A FILE
Suppose you want to store two copies of one file at a single place (but you must know
that there cannot be two files with same name at one place, that's why we put the copy
of our file by some other name) this can be done through Copy command. You must
know the root filename and the name of the copy of the file.

PAGE-4
FCIT UNIT-02

To deal with this, you type COPY command and type the root filename leaving one space
blank and again leave one more space, then after type the new name of the file to be
copied.
COPY THE FILE IN SAME LOCATION
Suppose you have to prepare a file named demo.txt and you have to name the
copy of the file as demo1.txt, the command will follow like this :
C:\> COPY demo.txt demo1.txt
This command will make a copy of demo.txt which will be named demo1.txt and both
the files will be present in C drive.

COPY THE FILE IN DIFFERENT DRIVE


Suppose you want to copy demo1.txt from C drive to A drive, give the
following command :
C:\> COPY demo1.txt A :

COPYING THE FILE FROM A DRIVE TO C DRIVE


If you want to copy the file from A drive to C drive, the COPY command will remain
the same with slight changes. By the following command the file NAM.TXT will be
copied from A drive to C drive by the name of VIK.TXT.
C:\> COPY A:NAM.TXT C:VIK.TXT
If you do not want to change the name of your file, do not type a new name in the
command. In that condition, the command given above will display like the following
C:\> COPY A : NAM.TXT

7. PATH COMMAND
PATH command is used to show path-set-up. Besides, with its help, you can set a new
PATH. For example, to see current path set up, type PATH command on C Drive and
Press Enter Key.
C:\> PATH = copy paste the required path

8. WILD CARD (?, *) CHARACTERS


WHAT IS QUESTION MARK (?) WILD CARD ?
Question-mark wild card is used to introduce one character in the filename. If you want
to make a list of those files in C drive which have 6 characters and their extension name
is .EXE, type the following command.
C:\> Dir ?????? .EXE
Remember that the question marks are to be used as many times as there are characters
in the filename.

PAGE-5
FCIT UNIT-02

If you want to make a list of all those files which start from MONTH and are followed by
two letters and their extension name is .DAT, the following command will be given

C:\> DIR MONTH??.DAT


This command will make a list of those files having two characters after MONTH such

as MONTH10.......MONTH99, MONTHLY etc. but it will not show a file like MONTH102.

WHAT IS (*) STAR WILD CARD ?

Star wild card is used to display a group of letters in the filename. Suppose you want to
make a list of those files which have their extension name as .'EXE', you will have to type
the following command:

C:\> DIR * .EXE

9. DELETING THE FILE


Any file may be deleted by giving DEL command.

C:\> DEL renamed.txt


When you use *.*, DEL command becomes very sensitive as it deletes all the files.
Therefore when you type,

C:\> DEL*.*
DOS prompt will let you ensure as follows :

All files in directory will be deleted from C drive : Are you sure (Y/N) ?
If you do not want to delete all the files, press N and if you think you don't need any

file, press Y. Doing this, all your files will be deleted.

DELETING FILES FROM ANOTHER DISK

Suppose you want to delete AGE .DOC file from A drive, you will have to give the
following command :

C:\> DEL A : AGE .DOC

DELETING A GROUP OF FILES

Suppose you want to delete all the files with extension .BAK, which are on C drive, give
the following command :

C:\> DEL *.BAK

PAGE-6
FCIT UNIT-02

DELETING A GROUP OF FILES FROM ANOTHER DISK

Suppose you want to delete all the files with extension name .DOC from drive A, type

the following command :

C:\> DEL A : *.DOC

10. RENAMING A FILE


Type REN command, leave blank space, write the old filename, leave one more blank
space, type the new name.

For example : If you want to rename a file TEST.txt as RESULT.txt, type the following

command.

C:\> REN TEST.txt RESULT.txt

RENAMING A GROUP OF FILES

Suppose you want to change all the files with extension .txt into .doc extension name,
you can do it by the following command :

ren *.txt *.doc

11. CLEARING THE SCREEN WITH CLS


If you want to clear the screen and get your prompt to the first line on the screen, type the
following command.
C:\> CLS

12. CREATING A FILE


We at times need to create files in DOS. To suffice this need, we use COPY CON command
in the following way -
C:\> COPY CON < Filename>
TYPE YOUR TEXT

^ Z or F6

For example, you want to create a file named PRAGYA and write a message in the file
to send it to somebody. Do like this -
C:\> COPY CON PRAGYA
PRAGYA IS A LEADING NAME IN THE FIELD OF PUBLICATION
^ Z or F6

PAGE-7
FCIT UNIT-02

13. MAKING & NAMING A DIRECTORY


The rule of naming a directory is similar to that of naming the files, but as it is in vogue,
directories are not given extension names.
To make a directory or sub-directory, the MD command is used.
First type MD, then leave a blank space, and then type the complete path for the location
where the directory is to be made.
Let us see how directories are created.
Step 1: Suppose there are two directories SALARY and BILL to be created inside root
directory. You will have to type the following commands:
C:\> MD SALARY

C:\> MD BILLS

Step 2: In this step, we will create two separate sub-directories. It means OFFICERS and
CLERKS directories in SALARY directory.

C:\> CD SALARY

C:\SALARY> MD OFFICERS

C:\SALARY> MD CLERKS

14. CHANGING THE DIRECTORY (CD COMMAND)


If you have to reach to the files of some specific directory, you'll have to use CD command.
First type CD, then leave a blank space and then type the name of the directory to which
you have to reach and press in the end.
C:\> CD SALARY

GOING BACK TO THE ROOT DIRECTORY

If you are in OFFICER sub-directory and want to get back straight to the root directory,
type the following command.

C:\> SALARY\OFFICERS> CD\

GOING BACK TO THE ROOT DIRECTORY STEPWISE

If you are in sub-directory CASH and want to get back to sub-directory NORTH, type the
following command :

C:\BILLS\NORTH\CASH> CD..

15. REMOVING A DIRECTORY


You need to remove some sub-directories from hard disk. Syntax is as follows

C:\> RD < directoryname>

PAGE-8
FCIT UNIT-02

16. RENAMING A DIRECTORY


To rename a directory, we use MOVE command. For example, you have to change the
name of a directory PRAGYA to CRESCENT, type the command like this -

C:\> MOVE PRAGYA CRESCENT

IMPORTANT EXTERNAL COMMANDS OF DOS


1. FORMAT COMMAND
When you purchase a new floppy, you need to format it, so that computer can read it.
For that, first we type FORMAT, then leave one blank space and then type the drive
name, which you want to format. It is necessary to put colon (:) after drive. You can
format the floppy by the following command :
C:\> FORMAT A :

2. CHKDSK COMMAND
This command is used to get information about the available space in the disk and
memory. It is also used to correct the disorder in the data-structure.To do this, use the
following command :

C:\> CHKDSK

3. XCOPY COMMAND
XCOPY command is a better alternative of COPY command. This command is available
in DOS 3.2 and its latter versions. This command acts quickly and helps you copy entire
directory or sub-directoriy with all the files (excluding system and hidden files).

Use the command in the following way -

XCOPY < Source> < Destination>

For example, to copy all the contents of RAHUL directory to the floppy, use the
command as such -

C:\RAHUL> XCOPY *.* A:/S

(/S helps you copy sub-directories and files.)

4. DOSKEY COMMAND
The use of DOSKEY command started from DOS version 5.00 and it is available in the
versions released after this. Before using this command, it is to be activated in the
memory. To activate it, type DOSKEY and press

PAGE-9
FCIT UNIT-02

This command is used to store the DOS commands to be used in the DOS prompt in the
memory buffer and with the help of buffer can display them in the same order with the
help of up and down keys. Besides it, the options given in the table can be displayed.

5. TREE COMMAND
You may see the list of directories and files in a tree form. To do so, type TREE at the
DOS prompt as follows -

C:\> TREE

To see directories of the disk on drive A, type the following command-

C:\> TREE A:

Both the commands used above display only directories and their sub-directories. If you
want to display files altogether, type the command in this way -

C:\> TREE /F

6. LABEL COMMAND
LABEL command is used to name your drive or diskette. Just type the command to do
this -
C:\> LABEL

When you execute the above command by pressing ENTER key a message appears.
Type the label name and press ENTER in the last line of message.

7. SORT COMMAND
SORT command is filter command of DOS which was included in the 2.00 version of
DOS. This is an external command. SORT command, by intercepting the numeric data
arranges it into alphanumeric order. The normal format of SORT command is like this -

PAGE-10
FCIT UNIT-02

SORT Source File > Destination file

The above given command by arranging the content of the source file in a directed
order copies it to the destination file.

For example, we create a file named ITEM with the help of COPY CON command, in
which you type the text like this -

LUX

RIN

WHEEL

HAIR CARE

NESCAFE

DOVE

After this, it is stored with the help of F6 or CTRL+ Z. Then we type the following
command-

SORT ITEM > ITEM1

Now the content of the ITEM file having been arranged in alphabetical order is copied

in ITEM1.

8. ATTRIB COMMAND
ATTRIB being an external command, is used to attribute some features, like using this
command you can make a file hidden or set into read only form. The syntax is -

C:\> ATTRIB < Filename> < switch>

For example, suppose you want to make a file named RAJ hidden, do this -

C:\> ATTRIB RAJ/+ H

After having executed this command, you can not find the above file using DIR
command as it has been made hidden.

Some other switches are as follows -

+H – To hide the file

+ R – To set the file into read only mode.

–R – To turn the file back into the normal form.

–H – Cancels the hidden attribute of the file and it is seen again in the displayed list.

PAGE-11
FCIT UNIT-02

9. HELP COMMAND
HELP command was used in 5.00 version of DOS and was extended in 6.00 version. In
both the versions, HELP command displays information regarding the given command.
Its format is-

HELP < Command Name>

Example :

HELP DIR

PAGE-12

You might also like