Chapter 2 DOS
Brief History of MS-DOS:
MS-DOS (Microsoft Disk Operating System) is a single-user, single- tasking computer operating system that uses a command line interface. In spite of its very small size and relative simplicity, it is one of the most successful operating systems.
MS-DOS (Microsoft Disk Operating System) is a single-user, single- tasking computer operating system that uses a command line interface. In spite of its very small size and relative simplicity, it is one of the most successful operating systems.
MS-DOS 1.0: It was the first version and used by IBM PC when IBM launched
first 16 bit personal computer system.
MS-DOS 1.0 was
actually a renamed version of QDOS (Quick and Dirty Operating System) or 86
DOS, which Microsoft bought from Seattle Computer Products Company designed by
Tim Patterson in order to provide compatibility with the popular business
applications of the day such as WordStar and dBase.
Subsequent
versions of MS-DOS featured improved performance and additional functions.
Version 1.25:Released in
1982, added support for double-sided disks.
Version 2.0:Released the 1983, added support for directories, for IBM‟s 10MB hard disk drive (HDD) and for 360KB,
5.25-inch floppy disks.
Version 2.11:Later in the
same year, which added support for foreign and extended characters.
Additions and
improvements in subsequent versions included support for multiple HDD
partitions, disk compression, disk-checking utility, enhanced memory
management, a disk defragmenter and an improved text editor.
The final major version was 7.0, which was released in 1995 as part of Microsoft Windows 95.
Essential Components of DOS
DOS is composed
of a number of files. However at a minimum there are three system files which
you must have.
These are
IO.SYS, MSDOS.SYS and COMMAND.COM.
COMMAND.COM,
the command processor (or shell) is the part of DOS that executes (or
processes) the commands.
These commands are either internal to the command processor (i.e. part of it), or external to it.
These commands are either internal to the command processor (i.e. part of it), or external to it.
Directory Structure of DOS
It is possible
to store hundreds of files on a disk and it is a difficult task to find a
particular file if they are not categorized in any way. Therefore DOS allows
you to group related files together in directories.
The main
directory on a disk is called the ROOT directory, which is represented by \ (a back slash). We can create sub
directories in the ROOT directory and within each other and they can each
contain a number of files. The directory structure is often thought of as an
inverted tree structure with the root at the top branching down into lower
layer directories and
subdirectories. For example -
FILE Structure:
Work is stored on disk in FILES. Each file will have a filename and (usually) an extension. The filename can be up to 8 characters and the File
extension up to three. The name and extension are separated by a full stop. Windows 95 will allow longer filenames under certain
circumstances.
DOS has certain rules governing the naming of files -
Filenames are not case sensitive.
Maximum length allowed for a filename is 8
characters.
Maximum length
allowed for the extension to a file name is 3 characters. The file name and
extension are separated by a. (period).
Characters not permitted in naming files are
. " / \ [
] : | <> + = ; , ? ^ * And Spaces
These characters have special meaning when used with
a file name.
File extensions
can have special meaning to DOS or other programs and are often used to
indicate the type of a file.
Here are some commonly used extensions and the type of file they
indicate BAK Backup file
BAS Basic program
BAT Batch file; it contains a group of DOS commands the user wants to run
COM Command file
DOC Document
EXE Executable file, Similar to COM file
BAS Basic program
BAT Batch file; it contains a group of DOS commands the user wants to run
COM Command file
DOC Document
EXE Executable file, Similar to COM file
PRN Print file
SYS System file
$$$ Temporary file
Other
extensions are conventionally used for specific purposes althoughnot demanded
by DOS. Some of the more common are:
DOC - a document file created by a word processing package TXT - an
ASCII text file
Directory Names:These follow
the same rules as ordinary file names except that extensions are not allowed in
version 5 and earlier versions of MS-DOS. Remember that a directory is just a
special kind of file - i.e. a file which can contain other files.
Booting: Process that starts up a computer is called booting. It checks for proper functioning ofall the peripheral devices attached with the system. It searches for the operating system and, when located, loads it into the main memory.
Booting: Process that starts up a computer is called booting. It checks for proper functioning ofall the peripheral devices attached with the system. It searches for the operating system and, when located, loads it into the main memory.
Cold Booting is done by turning on the computer.
DOS Commands
C
:\>Is known as
command prompt, where we give the commands. DOS command divided into 2 parts.
1.
Internal Commands or Memory-Resident
Commands
2. External Command or Disk Residence Commands
2. External Command or Disk Residence Commands
INTERNAL COMMAND
There are also called
memory-resident commands. These commands are
automatically loaded into the computer‟s memory
during the booting
process. They actually
included in the Command.com file. So
these commands are executable immediately after getting the dos prompt.
A few internal commands are
01.
VER
02. VOL
03 DATE
02. VOL
03 DATE
04.
TIME
05.
CLS
06.
DIR
07. MD
08.
CD
09. PATH
10.
RD
11.
COPY CON
12. TYPE
13.
COPY
14. DEL
15. REN
16.PROMPT
1. VER: - All OS has its own edition number or release or version
number. The versionnumber indicates which edition of O/S you are working on.
Syntax: VER <Enter>
Example:
C:\>Ver<Enter>
Result will be: - Microsoft
Windows XP [ Version 5.1.2600]
02.
VOL: - It is used to display volume
label and serial number of thecurrent
drive Syntax: Vol [drive:] Example: C:\> VOL
3.
DATE: - Used to display the current
system date and prompt for entering new date.
Syntax:
Date <Enter> Example: C:\> date <Enter>
4.
TIME: - Displays the current system Time and prompt for entering new time.
Syntax: Time <Enter> Example:
C:\> Time <Enter>
5.
CLS: - Clears the cluster screen.
Syntax: CLS <Enter>
Example: C:\> CLS
<Enter>
6.
DIR: - This command displays the list of directories and files with details like date ofcreation whether
it is directory or file etc.
Syntax: DIR <Enter>
Switch:
Switch:
/w : Displays only five
column of filenames and directories.(width wise)
/b : Display only file and
directory.
/l : Display all the information in lower case letters.
/l : Display all the information in lower case letters.
Example:
DIR *.txt :
Display all the files with extension .txt
DIR
D???.* : Display all the files starting with D and having less than or equal to
four characters in the file name and
any extension. Here “?” And “*” are called “wild card character”. “*” Stand for any number of the
character
“?”
Stands for nay one
character.
07.
MD OR MKDIR: -Used to create a new Directory or nested
Directories. Syntax: MKDIR OR MD [DRIVE:] PATH DIRECTORY NAME
Example: C:\> MD SAMS
<Enter>
08. CD OR CHDIR: - This
command allows you to change present directory
to anotherdirectory.
Syntax:
CD [DRIVE:] PATH
Example: C:\> CD SAMS and
press <Enter>
09.
PATH: - This command defines a list of directories DOS Searches for
externalcommands.
Syntax: PATH pathname
10.
RD: - To delete the empty directory. Syntax: RD [DRIVE:] PATH
NOTE: -The directory must be empty when
we use RD. Example: C:\> RD SAMS and press <Enter>
Switches: - 1. /s – Remove
with subdirectories and files.2. /q – Don‟t ask
to confirm.
11.
COPY CON: -We use this command to create a new file. Syntax: COPY CON <FILENAME>
Example: C:\> Copy Con
sams.txt <Enter>
Note: - Typing here and when you are done, press Ctr+Zor F6 key followed by Enter tosave the current document.
12.
TYPE: - This command allows you to see the contents of
an existing file on thescreen.
SYNTAX: TYPE <file name>
Example: C:\> TYPE SAMS
13.
COPY: - Using this command you can make duplicate files of an existing file from onelocation to
another or one directory to another with different name or exiting name.
SYNTAX: COPY < SOURCE FILE
NAME><TARGET FILENAME> Example: C:\> COPY SAMS.TXT D:\TAJ
You
can also have the option to change the name of files as you copy it. Example:
C:\> COPYold.TXT C:\dos\new.txt And Then Press Enter
14.
DEL/ERASE: This command removes one or more files from the disk or currentworking directories.
SYNTAX: DEL filespec
Example:
C:\> DEL C:*.BAK /P And Then Press Enter Example: C:\> DEL abc And Then
Press Enter Example: C:\> DEL ????.COM And Then Press Enter
15.
REN: Used to change the name of
the file or directory. SYNTAX: REN <file
name>
Example: REN sams sams1 <Enter>
16 PROMPT: This command allows you to
customize the dos prompt. SYNTAX: 1. PROMPT
SOME SPECIAL $ PARAMETERS ARE GIVEN BELOW.
EXTERNAL COMMAND:
These
are also called Disk-Resident Commands. These commands are meant for
Special
purpose. These are found in separate files on Hard Disk or Floppy Disk,
1.
XCOPY: This command is faster than Copy Command and
allows you to copy
entire
directories including all the sub directories and files to destination. Syntax:
XCOPY Source [ Target][/Y][-Y] [/P][/E]
SWITCHES :
/-Y : Prompts before copying
over existing files.
/y : Overwrites existing
files without prompting.
/p : Ask before copying each
file.
/e : Copying empty directory
also.
/s
: Copying subfolders.
EXAMPLE: XCOPY C:\SAMS
D:\SAMS /S/E
2.
MOVE : This command moves a file or group of files from one directory to another and also one disk to another disk.
SYNTAX:
Move [Path File Name] [Destination file name path]
EXAMPLE:
move c:\sams\fo.txt to d:\ new_sams
3.
DOSKEY: Dos can remember only the last command you had entered. But in order to make DOS remember all the commands you
enter you will have
to load a DOSKEY utility. Syntax: DOSKEY and Press <Enter>
Display message on the
screen.DOSKEY Installed.
Now when you want the same command tobe done you can
use right arrow key or „F1‟
4.
MEM:
This
command displays amount of total available memory (low, Expanded and
Extended) and all currently
programs. Syntax: MEM [/f][/p][/m]
Switches:
/p : Use this option to
display the information one screen at a time.
/m
: Display information about how a specified program is using memory. Example:
MEM/p and then press <Enter>
5.
FILTER:
A
Powerful feature of DOS is its use of filters to process data directly. There
are three FILTERS include in DOS.
A. MORE: More command used to pause vertical Scrolling on the display screen,
after
each screenful, The display pauses and the message - - More - - appears.
Pressing any key display the
next screen.
EXAMPLE: C:\> MORE <
TYPE FILE.TXT and then press <Enter>
B.
SORT: Reads, Sorts in Order and sends the data to the screen, file or to anotherdevice. Sort to arrange data in
an order.
SYNTAX:
SORT [drive:][Path][filename][/r][+n] Switches:
[drive:][Path][filename]
: Specifies the name and location of the file to be searches. It must be
precededby the redirection character (<).
EXAMPLE:
C:\> SORT < NAME .TXT and then press <Enter>
C. FIND: The find
Filter is used to search a file one
or more designated character (calleda text string). The text string is always
typed within quotes ( “Text Sring”).
.
EXAMPLE: C:\>
FIND “Rajni” my.txt per.txt and then press <Enter>
6.
ATTRIB:
Every
File on the Disk has its own description like size, space occupied, the type,
thedate it was created, etc. Likewise, every file has few attributes. The
attributes of a fileindicates whether it is a
i) Read-Only File: r ii)
Archive File a
iii) Hidden File: h iv)
System File s
With
the ATTRIB command you can check the attributes of a file. SYNTAX: ATTRIB
[+r][+a][+h][/+s] [filename]
Switches:
+r, -r : +r Read-Only
attribute or, -r turn of Read-Only attribute
+a,-a : +a archive
attribute, or -a turn of archive attribute
+h,-h : +h hidden attribute,
or –h turn of hidden attribute
+s, -s : +s system attribute
and it should not be used generally.
.
EXAMPLE: C:\> ATTRIB
my.txt +R and then press <Enter>
7.
DELTREE:
This command used
for deleting an entire directory whether in that directory containsfiles or
subdirectories and also it will delete hidden files.
9.
EDIT:
EXAMPLE:
C:\> EDIT c:\sams\FO.TXT and then press <Enter>
Main features of MS-DOS
1.
It is a single user operating system. It means it allows only one task
to be executed at one time and CPU is used by only one user.
2.
It provides command line interface and does not display graphical format
on the screen.
3.
It contains two types of commands i.e. internal commands and external
commands.
4.
It has its own command language and user can write small programs in
batch files.
Various
utilities of MS-DOS are preparing new disks, listing the contents of disk,
making subdirectories and files, sending files on screen; printer and disk,
copying files and much more.
Great efforts. Thanks
ReplyDeleteSetupsolutions - Alexa | Data Recovery | Garmin
Water Hack Burns 2 lb of Fat OVERNIGHT
ReplyDeleteAt least 160 thousand women and men are using a simple and secret "water hack" to lose 1-2 lbs each night while they sleep.
It is very easy and works on everybody.
This is how you can do it yourself:
1) Go get a drinking glass and fill it up with water half glass
2) And now learn this crazy HACK
you'll become 1-2 lbs lighter when you wake up!