44
MS-DOS

Hos

Embed Size (px)

Citation preview

Page 1: Hos

MS-DOS

Page 2: Hos

Computer FilesIn an organization, various files are

maintained like employee file, client file or purchase file etc.

Similarly, a computer hard disk contains various files such as textual file, graphics file etc.

Every file is given certain appropriate names.

Page 3: Hos

Continued…A file name should be descriptive and

meaningful.A file name can have two parts:

Primary nameExtension

And generally they are separated with the help of a dot.

Page 4: Hos

Continued…A primary name can have a maximum of

eight characters while an extension can have maximum of three characters.

A file name is valid even without an extension.

Extensions help in identification of files.File names should be valid.

Page 5: Hos

MS-DOS/PC-DOS/DOSIt is non graphical, line-oriented command-

driven operating system having simple interface and non friendly environment.

User can type the commands either in upper case or in lower case but DOS interprets/stores everything in upper case letters.

Page 6: Hos

Continued… If you boot the system from hard disk drive by

default the prompt that you find in DOS looks like

C:> If you are booting from floppy drive then

prompt will look likeA:> or B:>

If you are booting from optical disk drive or CD then prompt will look like

E:>

Page 7: Hos

Let’s define DOS nowIt is an interpreter, that provides a linkage(interface) between electronic circuitry and program.

It is a program loaded into the memory of user’s PC before execution of any application.

It creates an environment for managing the resources and execution of any program having extension .exe,.com,.bat

Page 8: Hos

More about DOSIt is a single user operating systemThe core of DOS is contained in three files,

IO.SYS, MSDOS.SYS and COMMAND.COMThe disk that contains all the three files is

called a Bootable disk or Startup disk or simply DOD disk.

Page 9: Hos

Bootstrap procedureAfter the system unit is switched on , a

search is made on A drive for DOS software, if it is not available it is searched on the hard disk. Then it is loaded automatically.

Page 10: Hos

Important NoteA floppy disk or hard disk is divided into

concentric circles called tracks. These tracks are further sub divided into sectors. The boot sector is the first sector on the disk.

Page 11: Hos

IO.SYS

MSDOS.SYS

COMMAND.COM

Page 12: Hos

IO.SYSIt has two main parts:

-To verify the various input and the output devices. All drivers together called DISK BIOS.-Another part is SYS.INI which loads the file MSDOS.SYS from hard disk into memory and it becomes a memory resident program.

Page 13: Hos

MSDOS.SYSProvides a link between BIOS and user’s

application program.Provides the facility of isolating the program

from the physical aspect of the system and intricacies of the hardware

Page 14: Hos

Continued…It provides the following functions:

-Process Control-Memory Management-Application Program Interface-File management System

Page 15: Hos

COMMAND.COMIt is divided into two portions:

-Resident portion-Transient portion

Page 16: Hos

DOS commandsDOS commands are divided into two parts:

Internal CommandsExternal Commands

Page 17: Hos

Internal CommandsThese commands are automatically loaded in

the memory when DOS is loaded in the memory.

These commands cannot be seen with the help of DIR command.

They are easy to learn and operate.

Page 18: Hos

Continued…CLSDIRDATETIMEVOL VERCOPY CONTYPE

MDCDRDPATHCOPYPROMPTRENDEL

Page 19: Hos

Continued…CLS – To clear the

display screenC:\>CLS

DIR – To display list of directories, sub directories and files.C:\>DIR

DATE – To display the system’s current date and new date can be entered. C:\>DATE

Page 20: Hos

Continued…TIME – To display the

current system’s time and new time can be entered. C:\>TIME

VOL – To display the volume label or name of the volume given by the user to a disk and to check the volume name given by the label or format command. C:\>VOL

Page 21: Hos

Continued…VER – Displays the

current/installed version of DOS on the system. C:\>VER

COPY CON – To create the file. C:\>COPY CON Table^Z1 file(s) copied

Page 22: Hos

Continued…TYPE – To display the

contents of the file. C:\>TYPE

REN – To rename old file name with new file name. C:\>REN abc xyz

DEL-To delete the single file,multiple files can be deleted by using wild cards. C:\>DEL table.exe C:\>DEL *.*

Page 23: Hos

Continued…MD – to create a directory

or sub directory under the current directory. C:\>MD fan

CD – to change from one directory or sub directory to another directory or sub directory. C:\>CD.. C:\>CD fan

RD – to remove a directory or sub directory and it should be empty before deleting it. C:\>RD fan

Page 24: Hos

Continued…PATH- To provide

access to the files located in other directory paths or disk. C:\>PATH=D:\AC;

COPY-To copy one or more files to another disk with same filename. C:\>COPY E:*.* D:\AC

Page 25: Hos

External CommandsThese are not the permanent part of the

memory.To run these commands , external files are

required.These are used for relatively complex jobs

like copying an entire diskette into another, sorting a disk etc.

Page 26: Hos

Continued… EDIT ATTRIB BACKUP RESTORE CHKDSK DISKCOPY DISKCOMP DELTREE DOSKEY FORMAT FDISK

FIND LABEL MORE MODE MOVE PRINT SCANDISK SORT SYS TREE POWER

Page 27: Hos

Continued…Edit- -To execute EDIT.COM is

required.-This file utilizes 413KB

space of memory.-Edit program is a full

screen editor.-Purpose is to create a

new file or modify the contents of an existing file.

- Syntax is C:\>EDIT filename.extension

Page 28: Hos

ATTRIBATTRIB:- To execute

ATTRIB.EXE file is required

- Utilizes 11,208 KB space in memory.

- Purpose is to change the attribute of a file.

- Syntax is C:\>ATTRIB filename C:\>ATTRIB fan +H+R

Page 29: Hos

Attributes- Attributes+R - Read only-R - To remove read

only+H - To hide the file-H - To unhide a

hidden file+A - To set the file

Archival-A - To reset the file

Archival+S - To set the system

file-S - To reset for

system file

Page 30: Hos

Backup CommandBack Up- Used to copy the

various files from the hard disk or floppy to create backup disk.

- The file required is BACKUP.EXE

- Covers 35,715 KB for its storage

- Syntax is C:\>BACKUP Source path options Target path

Page 31: Hos

Options /S – to copy all

subdirectories of source path /M – to copy all files of

source path which are modified since last backup.

/A – to copy files to the target disk without erasing the target disk. Without this option Backup command erases all files of target disk.

/D - to copy files saved on or after given date

/T – to copy files saved on or after given time.

/F – to format the target disk before doing backup.

/L - Creates a file containing time and date of backup files.

C:\>BACKUP C:\DOS A:/S/L

Page 32: Hos

RestoreUsed to restore files

copied by backup command.

File required for this command is RESTORE.EXE.

Space required for this is 38342 Bytes.

Syntax is C:\>Restore Source path Options Target path

Page 33: Hos

Options /S – to restore all files from all

subdirectories. /P – to prompt before restoring

files that are read only and which are changed since the last backup.

/B - to restore all files on or before the given date.

/A - to restore all files on or after the given date.

/E – to restore files on or earlier than given time

/L – to restore files on or later than given time.

/N - to restore files that are no longer exists on destination disk.

/D – to restore files which match given specification on the backup disk.

Example:- C:\>RESTORE B: C:/S

Page 34: Hos

CHKDSKRequires CHKDSK.EXE

fileTakes 12,241bytes for

storage.Returns the configuration

status of the selected disk.

Returns volume serial number, total disk space, space in hidden files, space in directories, space in user files, space available on disk, number of bytes in each allocation unit, total number of allocation units, available number of allocation units, total memory and free memory.

Syntax is C:\>CHKDSK drive name

Page 35: Hos

DISKCOPYRequires

DISKCOPY.COM file.Uses 13,335 bytes of

storage.Used to make duplicate

copy of the disk like xerox copy. It formats the target disk and then copies the files by collecting files from the source disk and copies to the target disk

Syntax is C:\>diskcopy <source path> <destination Path>

Page 36: Hos

DISKCOMPRequires DISKCOMP.

COM file Covers 10748 bytes of

storageTo compare the disksTo find out they are

identical or notIf we will try to compare

two dissimilar disk it will display an error message.

Syntax is: C:\> DISKCOMP <<source disk path>> <<target disk path>>

Page 37: Hos

DELTREERequires

DELTREE.EXE fileSpace required is

11111 bytesUse to delete files

and directoriesSyntax is C:\>

DELTREE <Path>

Page 38: Hos

FINDRequires FIND.EXETakes 6770 bytes for its

storageUse to search files stored

on the disk and data stored in the files

Syntax is C:\> Find “text” <filename>

C:\> DIR|FIND “filename”/C- returns number of

lines containing specified text

/I- ignores upper case and lower case

/N- displays number of lines that contains the specified text

Page 39: Hos

LABELRequires LABEL.EXE9390 bytes for its

storageUsed to see volume

label and to change volume label

The label should be maximum of 11 characters.

Syntax is C:\> Label <Drive Name>

Page 40: Hos

PrintRequired PRINT.EXE

file and 15656 bytes for storage

Used to print the filesFiles must be

standard text files and containing data compatible to the printer.

Syntax is C:\> PRINT <Filename>

Page 41: Hos

DOSKEYRequires

DOSKEY.COMIt takes 5861 bytes of

storage mediaUsed to display the

history of the DOS commands typed by user using the keyboard.

It stores number of commands in memory buffer according to its size.

Page 42: Hos

FormatRequires FORMAT.COMRequires 22974 bytes

Use to make disk usable for operating system by dividing the disk into magnetic tracks and sectors

Number of sectors and tracks depends upon capacity of the disk and dos version

Syntax is C:\> format <drivename>

Page 43: Hos

FDiskRequires FDISK.EXE

and requires 29336 bytes

It is used to make a fixed disk for use

To make partition of high capacity fixed disk and can organise cylinder on it to store the data

Syntax is C:\> FDISK

Page 44: Hos

MoreRequires MORE.COM

file and 2545 bytes for storage

It is a filter command like find and sort, to see the contents of the file page by page

Used with dir and type command

Syntax is C:\> More <file name>

C:\> Type <filename>|more