Dos
Disk Operating System
1. DOS (Disk Operating
System:-
DOS
(Disk Operating System) was the first widely-installed operating system for
personal computers. The first personal computer version of DOS, called PC-DOS,
was developed for IBM by Bill Gates and his new Microsoft Corporation. He
retained the rights to market a Microsoft version, called MS-DOS.
PC-DOS
and MS-DOS are almost identical and most users have referred to either of them
as just "DOS." DOS was (and still is) a non-graphical line-oriented
command- or menu-driven operating system
2.
The Command Prompt
When
you first turn on your computer, you will see some cryptic information flash
by. MS-DOS displays this information to let you know how it is configuring your
computer. You can ignore it for now. When the information stops scrolling past,
you'll see the following:
C:\>
This
is called the command prompt or DOS prompt. The flashing underscore next to the
command prompt is called the cursor. The cursor shows where the command you
type will appear.
3.
Files in MS DOS
In
computers data is stored in files. When
you run a program, MS-DOS processes the data stored in the file and passes it
to the system.
In MS-DOS a file can be any size, however the file name is more restricted, it can only have a maximum length of 8 characters plus 3 for the extension.
Furthermore, the files can only
contain the following characters:In MS-DOS a file can be any size, however the file name is more restricted, it can only have a maximum length of 8 characters plus 3 for the extension.
·
letters A to Z
·
numbers 0 to 9
·
The following special
characters: $~! # % & - { } ( ) @ ' _ ^
Thus filenames must not contain:- spaces
- commas
- backslash
- dot
(apart from the dot that separates the name and the extension)
- CLOCK$
- CON
- AUX
- COM1
- COM2
- COM3
- COM4
- LPT1
- LPT2
- LPT3
- NUL
- PRN
4.
Organizing files in directories or folders
Depending
on its size a hard drive may contain several thousands of files. However, the
more files there are, the more difficult it is to manage them, this is when we
need to store them in directories
In MS-DOS, directory names are also subject to the same name restrictions as
files (8 characters for the name, and an extension with 3 characters)
5.
Booting
When
we start our Computer then
there is an operation which is performed automatically by the Computer which is
also called as Booting. In the Booting, System will check all the hardware’s
and Software’s those are installed or Attached with the System and this will
also load all the Files those are needed for running a system.
5.1 Types of Booting
There are two Types of Booting
·
Warm Booting
·
Cold Booting
5.1.1) Warm Booting: when the System Starts
from the Starting or from initial State Means when we Starts our System this is
called as warm Booting. In the Warm Booting the System will be started from its
beginning State means first of all, the user will press the Power Button, then
this will read all the instructions from the ROM and the Operating System will be automatically gets loaded
into the System.
5.1.2) Cold Booting : The Cold Booting is that in which
System Automatically Starts when we are Running the System, For Example due to
Light Fluctuation the system will Automatically Restarts So that in this
Chances Damaging of system are More. and the System will no be start from its
initial State So May Some Files will b Damaged because they are not Properly
Stored into the System.
6.
Dos command divided into two parts:-
6.1 Internal command
6.2 External command
6.1
Internal command:-
These command included as part of
the file COMMAND.COM and that resident in memory at all times while booting.
For example:
DATE,TIME,CLS,DIR,VOL,VER,PROMPT,COPY CON,COPY,DEL
or ERASE,TYPE,REN,MD,CD,RD, etc.
DATE COMMAND:-
Display
or sets the date.
Syntax: DATE
[date]
Parameter: mm-dd-yy
Example: C
:\> DATE <Press enter>>
Current date is sun 06-10-2012
Enter the new date (mm-dd-yy) :
05-12-2012
TIME COMMAND:-
Display or sets
the system time.
Syntax: TIME
[time]
Parameter: hh-mm-ss
Example: C :\> TIME <Press enter>
Current time is 10:20:51:52
Enter the new time:
CLS COMMAND:-
Clear the screen.
Syntax: CLS
Example:
CLS <Press enter>
VOL COMMAND:-
Display
the disk volume label and serial number, if they exits.
Syntax: VOL
[drive]
Example: C
:\> VOL <Press enter>
Volume in drive C is Bits
Volume serial number is 1c46–08f4
VER COMMAND:-
Display
the windows version.
Syntax: VER
Example: C
:\> VOL <Press enter>
Windows 98 (version 4.10.1998)
PROMPT COMMAND:-
Change
the windows command prompt.
Syntax: PROMPT [text]
Example: C
:\> PROMPT BITS$G <Press enter>
BITS>PROMPT $P$G
Prompt can be made up of
normal characters and the following special code:
$Q =
(equal sign)
$$ $
(dollar sign)
$T Current
time
$D Current
date
$P Current
drive and path
$V Windows
version number
$N Current
drive
$G >
(Greater than)
$L <
(Less than)
$B |
(pipe)
$H Backspace
(erase previous character)
Type PROMPT without parameter
to reset the prompt to the default setting:
C:\> Prompt
$P$G
DIR COMMAND:-
Display
a list of file and subdirectories in a directory.
Syntax: DIR [drive:] [path] [filename]
[/P][/W][/A][[:] [attributes]]
[/O] [[:]sort order]] [/S] [/B] [/L] [/V] [/4] [Drive:] [Path] [File name]
Switches:
/P pauses after each screen full of
information.
/W Uses wide list format.
/A Display files with specified attributes.
Attributes:
D- Directories
R -Read-only files
H -Hidden files
A -files ready for archiving
S -System files
/O List
by files in sorted order.
N By
name (alphabetic) S By size (Smallest first)
E By
extension (alphabetic) D By date & time
Example:
DIR/ON,
DIR/OS, DIR/OE, DIR/OE, DIR/OD
Switches:
/S Displays
files in specified directories and subdirectories.
/B User
bare format (no heading information or summary).
/L Uses
lowercase.
/V Verbose
mode.
/4 Displays
year with 4 digits (ignored if /V also given)
MDCOMMAND:-
Create
a directory.
Syntax: MKDIR
[drive:] path
MD [drive:] path
Example: C
:/> MKDIR RAMAYAN
C
:/> MD Computer
CDCOMMAND:-
Create a directory.
Syntax: CHDIR
[drive:] path
CHDIR
[..]
CD [drive:] path
CD
[..]
Example: C
:/> CD RAMAYAN <Press
enter>
C :/> RAMAYAN> <Press enter>
C :/> CD RAMAYAN/SHYAM/HARI <Press enter>
C
:/> RAMAYAN/SHYAM/HARI> <Press enter>
C:/>RAMAYAN/SHYAM/HARI>CD\
<Press enter>
RDCOMMAND:-
Removes (deletes) a
directory.
Syntax: RMDIR
[drive:] path
RD [drive:] path
Example: RD
Computer <Press enter>
COPY CON COMMAND:-
Create
a text file. F6 or CTRL+Z to save the contents of a file.
Syntax: COPY
CON [drive:] [path] file name
Example: COPY
CON poem.txt <Press enter>
India is our country. F6 or CTRL+Z
<Press enter>
1 File(s) copied
TYPE COMMAND:-
Display
the contents of text files.
Syntax: TYPE
[drive:] [path] file name
Example: TYPE
poem.txt <Press enter>
India is our country.
COPY COMMAND:-
Copies
or one or more file to another location.
Syntax: COPY [/A|/B] source
[/A|/B] + [/A|/B] [+…] [destination]
[/A|/B] [/V] [/Y] [/-Y]
Source specified the file or files to be copied
/A Indicates
an ASCII text files.
/B Indicates
a binary file.
/V Verifies
that new files are written currently.
/Y suppresses prompting to
confirm you want to overwrite an existing destination file.
/-Y Cause prompting to confirm you
want to overwrite an existing destination file.
Example: C:\>COPY POEM.TXT FRUIT.TXT <Press
enter>
RENAME COMMAND:-
Rename
a file/directory or files/directories.
Syntax: RENAME [drive:] [path] [Directory name1] [File
name1] [Directory name2] [File name2]
REN [drive:]
[path] [Directory name1] [File name1] [Directory name2] [File name2]
Example: REN
FRUIR.TXT POEM.TXT <Press enter>
DEL/ERASE COMMAND:-
Deletes
one or more files.
Syntax: DEL
[drive:] [path] filename [/P]
ERASE
[drive:] [path] filename [/P]
Example: DEL
POEM.TXT <Press enter>
6.2
External command:-
These
command which are not part of the file COMMAND.COM and that need executable
file usually stored in the c:\DOS in MS-DOS environment.
For example:
TREE, DELTREE, FIND, SORT, MORE, LABEL, DOSKey, XCOPY, ATTRIB, EDIT, DISKCOPY,
CHKDSK, SCANDISK, etc.
COLOR COMMAND:-
Sets
the default console fore background and background colors.
Syntax: Color [attribute]
Attributes:
Color attributes are specified by two color hex dixit –
the first corresponds to the background; the second the background. Each digit
can be any of the following value:
0
|
Black
|
8
|
Gray
|
1
|
Blue
|
9
|
Light Blue
|
2
|
Green
|
A
|
Light Green
|
3
|
Aqua
|
B
|
Light Aqua
|
4
|
Red
|
C
|
Light Red
|
5
|
Purple
|
D
|
Light Purple
|
6
|
Yellow
|
E
|
Yellow
|
7
|
White
|
F
|
Light White
|
Example: C:\> Color 4
C:\> Color 4F
FIND COMMAND:-
Searches for a text string in a file or
files.
Syntax:
FIND [/V] [/C] [/N] [/I] “string”
[[drive:] [path] filename […]]
/V
Displays
all lines NOT containing the specified string.
/C Displays
only the count of line containing the string.
/N Displays
line number with the displayed line.
/I Ignore
the case of characters when searching for the string.
“string” specified the text string to find.
C:\> FIND/N
“APPLE” POEM.TXT
SORT COMMAND:-
Sorts
input and writes results to the screen, a file, or another device.
Syntax: SORT
[/R] [drive:] [path] [file name]
C:\> SORT/R
POEM.TXT
MORE COMMAND:-
Display
output one screen at a time.
Example: C:\>
MORE POEM.TXT
ATTRIB COMMAND:-
Display
or change files attributes.
Syntax:
ATTRIB
[+R] [+A] [+S] [+H] [drive:] [path]
ATTRIB [-R] [-A] [-S] [-H] [drive:]
[path]
+ Sets
an attributes
- Clears an attributes
R Read-Only
file attributes
A Archive
file attributes
S System
file attributes
H Hidden
file attributes
Example: C:\>
ATTRIB +R MANISH.TXT
C:\> ATTRIB +H MANISH.TXT
C:\> ATTRIB -R MANISH.TXT
C:\> ATTRIB -H MANISH.TXT
DELTREE COMMAND:-
Delete
a directory and all the subdirectory and files in it. To delete one or more
files and directory.
Syntax: DELTREE
[/Y] [drive:] [path] directory name
/Y Suppress prompting to confirm you want
to delete the subdirectory.
Example: C:\>
DELTREE MEMORY
C:\>
DELTREE/Y MEMORY
LABEL COMMAND:-
Create, change or delete the volume label of a disk.
Syntax: LABEL [drive:]
[label name]
Example:
C:\> Label DOS
CHKDSK COMMAND:-
Check
a disk and displays status report.
Syntax:
CHKDSK [drive:]
Example:
C:\> CHKDSK
EDIT COMMAND:-
MS-DOS Editor Version 2.0.026 copy
right© Microsoft Corp 1995.
Syntax: Edit
[/B] [/R] [File name]
/B Force
monochrome mode.
/R Load
files in read only mode.
Example: C:\>
Edit/B DOS.TXT
C:\>
Edit/R DOS.TXT
C:\>
Edit DOS.TXT
7.
Wild Card:-
Wildcards are symbols that enable
you to perform an MS-DOS operation on more than one file at a time. A file
specification that contains wildcards can refer to more than one file because
it gives MS-DOS a pattern to match.
There
are two wildcard characters:
ü Question
mark wild card (?)
ü Asterisk
Wild card (*)
8.
Batch Command:
A
batch file or batch job is a collection, or list, of
commands that are processed in sequence often without requiring user input or
intervention. With a computer running a Microsoft operating system such as Windows,
a batch file is stored as a file with a .bat
file extension.
No comments:
Post a Comment