05 Disk Operating System
05 Disk Operating System
: PPT/2K804/04
PPT/2K403/02
History of DOS
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
Microsoft DOS
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
• DOS cannot support more than two floppy drives and are
assigned drive letters A: and B:
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
DOS Commands
on the screen.
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
DIR
• Syntax
– dir {drive:}{path}{filename}{.ext}{/p}{/w}{/a{{:}attribute}}
{/o{{:}sortorder}}{/s}{/b}{/l}
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
DIR (contd.)
• When /a option is not used, dir displays all files except those
with hidden or system attribute. Any combination of values
can be used.
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
DIR (contd.)
subdirectories.
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
DIR (contd.)
• Examples
– To list all the files starting with alphabet “a” having any
extensions
c:\> dir a*.*
– To list all the files starting with alphabet “a” having extension of
“.txt”
c:\> dir a*.txt
– To list all the files starting with “a” having 2nd & 3rd character
position to be any alphabet with extension “.txt”
c:\> dir a??y.txt
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
CD
• Syntax
– cd {drive:}{path}{..}
• Used to change from one directory to another directory.
• Examples
– To change the current drive and directory
a:\>cd c:\word
– To return to the parent directory from the current child directory,
use double dot (..) parameter.
c:\word\lookup> cd..
– To return to the root directory from any position, only the
backslash parameter needs to be issued.
c:\word> cd \
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
MD
• Syntax
– md {drive:}{..}{path}{name}
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
RD
• Syntax
– rd {drive:}{..}{path}{name}
• Used to remove or delete a directory.
• Example
– To delete directory which is not a subdirectory of the current
directory, the path must be provided.
C:\> rd \word\temp
• While removing any directory using the ‘RD’ comand, the
directory should be empty. If we try to delete the directory
consisting of sub-directories and files, then it gives an error
message saying “ directory not empty”.
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
TYPE
• Syntax
– type {drive:}{path}{filename}
• Example
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
COPY
• Syntax
– copy {con}{/a|/b}{{source {/a|/b}}{+source {/a|/b}}{+ ...}} {destination
{/a|/b}}{/v}{printerport}
• Used to copy one or more files to another location.
• Example
– To copy a file from source to a destination in another drive the
path must be specified
A:\>copy thisfile.doc c:\word\thatfile.txt
– To copy a file directly from the keyboard or to create a file
C:\>copy con prog
– Using con and printer port name you can copy a file directly from
the keyboard to the printer
A:\>copy con lpt1
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
REN
• Syntax
– ren {drive:}{path}{ filename}{newname}
• Example
– If the file to rename are not in the current directory, the drive and
path will need to be specified.
c:\> ren a:thisfile.txt thatfile.txt
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
DEL
• Syntax
– del {drive:}{path}{ filename}{/p}
• Example
– If the file to delete is not in the current directory, the drive and
path will need to be specified.
c:\> del \word\lookup\*.txt
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
CLS
• Syntax
– Cls
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
EDIT
• Syntax
– edit drive:\path\file /d
• Example
– To start the editor with file ‘Text.fil’, the command would be
c:\edit Text.fil
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
XCOPY
• Syntax
– xcopy source{destination}{/a|/m}{/d:date}{/p} {/s}
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
XCOPY (contd.)
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
FORMAT
• Syntax
– format {drive:}{/v{:label}{/q}{/u}{/f:size}{/b}{/s}
• Used to prepare the disk to accept DOS files.
• The following are the FORMAT command switches
– /v:label specifies the volume label while formatting the disk.
– /q deletes the file allocation table and the root directory of a
previously formatted disk.
– /u specifies an unconditional format operation for a floppy
disk or a hard disk.
– /s copies the operating system files io.sys, ms-dos.sys and
command.com from your system’s startup drive to the
newly formatted disk.
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
FORMAT (contd.)
• It creates a new root directory and file allocation table for the
disk.
• Example
C:\> format a:
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
Redirections
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
MORE
• Syntax
– more< {drive:}{path}{filename}
or
{command} | more
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
• DOS has two special text files for adding control to new
hardware via CONFIG.SYS and AUTOEXEC.BAT
Device Drivers
• BIOS is added through special files called device drivers.
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
CONFIG.SYS
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
Batch File
• DOS creates and stores DOS commands that are acted upon
entered.
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
AUTOEXEC.BAT
process.
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2006. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute