Disk Operating System - Intro and its common commands
Ms-Dos is a result of shortening of Microsoft operating system. It is a popular operating system designed by Microsoft corporation for the user of IBM compatible computer and is replaced by its extension of Windows OS. It is a Character User Interface (CUI) or Text Based Interface (TBI), in which all commands and correct meaning have to be remembered and all are in text form.
The main function is to establish the relationship between hardware and software. It also provides an executable environment to the software inside the system. Out of this, it also allows a user to communicate with a computer by all the way by the use of commands called DOS command.
Thus, it is an interpreter between hardware and software and provides the working environment to the users. It also controls the hardware, such as the keyboard, monitor, printer, etc.
Features of MS-DOS:
- It is the primary type of OS, used before the Windows was developed.
- It is a 6-bit operating system developed for personal computers.
- It uses CUI. So, a user needs to provide instructions through the text and internal commands.
- It uses two types of commands: externals and internal commands.
- It does not provide graphics facility but, some application programs which runs under DOS and may provide graphics facility.
- Improved memory management capabilities
- Hierarchical file directory structure.
CUI (Character User Interface)
The operating system which provides the user with the faculty of entering commands through interactive terminals for initiating program and applications is called CUI OS. CUI based on OS allows a user to type their commands using the keyboard to get computer’s response. The response is to display on the screen .
CUI never call a program running. Under it, we have to give a command to create the folder, copying files, deleting folder, etc. Examples: MS-DOS, PC-DOS.
Characteristics of CUI:
- They are very difficult to use because the user needs to memorize the command and syntax.
- Not user operating system.
- Graphics design and image are presented to the user in the form of a text line.
- It does not support multimedia and animation.
- Input and output are provided to the user in the form of a text line.
(Dilli , et al., 2015,159-166)
File
A file is a collection of related information. It has a name with the extension that specifies a type of file. Executable files are also called Program files and often have an extension like .exe and .com. Examples: practical.doc, where practical is a file name and .doc, is an extension.
TYPES OF FILES
Basically, there are 4 types of files. They are:
- Program or executable file (.exe, .com, .bat)
- Graphics file or picture files (.bmp, .jpg, .gif)
- Data file (.dat, .mdb)
- Text file (.doc, .txt, .ini)
There are some rules for writing the file name. Such as:
- The primary filename cannot be more than 8 characters. Example: computer.jpg
- Extension file name cannot exceed 3 characters. Example: vtae.xls
- No blank space is allowed between file name and extension.
- Primary and extension file name are separated by a period dot (.).
- Punctuation marks; @, $, ^, #, %, can be used for file name. Example: [email protected]
- Rest of the other symbols is not allowed to use in a file name.
- Characters (a-z, A-Z) and numbers (0-9) can be used for a file name.
Directory
A directory is a catalog for files stored on the disk of personal computers. It is used for organizing the files on the disk to make it easier to find the files. It contains the names of the files, size, date and time the stamps are created or modified. The root directory is the initial directory of a storage disk. All other directories on that are sub-directories of that root. The root directory is indicated by the backslash (/). A subdirectory is a directory within another directory.
Rules for writing the directory names:
- Directory name must not exceed 8 characters.
- The extension can be up to 3 characters.
- Blank space is not allowed.
- Both the upper and lower case letter are accepted.
Given figure represent the directories:
Wildcard Character
Wildcards are characters that can be used to stand-in for unknown characters in file names. In DOS, wildcard characters can match up with any character that is allowable in a file name. There are two wildcards in DOS:
*: Matches up with any combination of allowable characters.
? : Matches up with any single allowable character.
The asterisk character '*' can stand in for any number of characters.
Some example of this command:
C:\>del*.doc
This command would delete every file with the doc extension from the root directory of C:
The question mark wildcard, ? stand in for any single character.
Some example of this command:
C:\>del?.doc
This command would only delete files that had a single character a.doc or 1.doc is history, but a file like io.doc is perfectly safe as it has two characters.
System files
This operating system has three essential files and many command files for booting the computer system. The files are:
- SYS: This file let the DOS communicate with hardware through the BIOS. It provides the basic capabilities of I/O. SYS direct the overall process of loading the OS.
- MS-Dos.SYS: This is the program used by application programs. It contains special subprograms to make common operations easy for the programs. It runs after the IO.SYS. It contains the core operating system code called kernel.
- com: This file accepts and understands the common that enter using the above two files to give desired results. It is the command interpreter.
- Sys: Config.sys is a kind of text file containing special Dos commands that tell the OS how the component so that MS-Dos and application can use them.
- BAT: All the programs that are supposed to run at startup are called BAT. It is a file used to run initialization programs and command that, we would normally type each time we sat on the computer.
Disk Operating System (DOS) is a set of control programs which manages the computer’s resources and creates a well-defined software environment for applications. It is an operating system which controls the computer hardware. Word perfect, LOTUS, dBase, TURBO C/C++, etc. are some software which runs under DOS.
Commonly used as the short form for MS-DOS, it was first developed in 1979. It grew from 1981 when it was requested by IBM for an operating system for its IBM PC range of personal computers. Then, Microsoft quickly bought the rights to QDOS (Quick and Dirty Operating System), also known as 86-DOS from Seattle Computer Products and began working on modifying it to meet IBM’s specification. The 1st edition, MS-DOS 1.0 was launched in 1982. The version shipped with IBM’s PCs was called PC DOS.
The main features of MS-DOS are:
- It is a single user, single programming operating system.
- It supports the hierarchical file system.
- It supports the dynamic file allocation.
- Disks such as floppy disk and hard disk are both supported.
- It is machine independent i.e. it supports a variety of languages.
- It supports I/O devices.
TYPESOF COMMANDS
Internal commands
Internal commands refer to built-in commands. They are such commands that are already loaded into memory when command.com is loaded. Thus, these are also called memory-resident commands. Since, they are parts of command.com file, they are not listed by DIR command while they can be executed by any DOS prompt because they don’t need to read any extra program file, they execute immediately.The command available are all combined together and are stored in Command.com file, which is a executable command file. These internal command are further grouped according to their properties.
Some Internal commands, their syntax and uses are:
- Command: DIR (directory)
Syntax: DIR [drive:] [path] [/p] [/w] [/O: Order] [/A: Attributes] [/s]
Use: This command is used to display a list of files, directories and sub-directories.
Here,
|
p |
Page by page |
|
w |
Column wise |
|
O |
Order |
|
A |
Attributes |
|
s |
Sub-directories |
- Command: COPY
Syntax: COPY [drive:] [path] [drive:] [path]
Use: This command is used to make duplicate files from one location to another.
- Command: DATE
Syntax: DATE
Use: This command is used to display and change the date of a computer.
- Command: TIME
Syntax: TIME
Use: This command is used to change and display the current time of the computer.
- Command: CLS
Syntax: CLS
Use: This command is used to clear up the screen.
- Command: TYPE
Syntax: TYPE [drive:] [path]
Use: This command is used to look at a text file’s content which was already made.
- Command: DEL (delete)
Syntax: DEL [drive:] [path]
Use: This command is used to delete files.
- Command : REN (rename)
Syntax: REN
Use: This command is used to rename files.
- Command: VOL (volume)
Syntax: VOL [drive:]
Use: This command is used to display volume level of the disk drive.
- Command: MD (make directory)
Syntax: MD
Use: This command is used to create a new directory for use.
- Command: CD (change directory)
Syntax: CD
Use: This command is used to change or get into the directory.
- Command: RD (remove directory)
Syntax: RD
Use: This command is used to remove a directory which must be empty.
- Command: TREE
Syntax: TREE [drive:] [path]
Use: This command is used to display all the files, sub-directories, and directories in a tree structure.
- Command: EXIT
Syntax: EXIT
Use: This command is used to exit or close the DOS or to return to a windows application.
- Command: PROMPT
Syntax: PROMPT [text or definition]
Use: This command is used to change MS-DOS prompt style.
Here,
|
Text Option |
Meaning |
|
$D |
Current date |
|
$T |
Current time |
|
$Q |
Equal sign |
|
$P |
Current drive and path |
|
$V |
Ms-DOS version number |
|
$G |
Greater than sign |
|
$L |
Less than sign |
|
$P$G |
Original prompt |
|
$B |
Pipe sign (│) |
|
$_ |
No prompt |
External commands
Those commands that are on the disk as separate program files are called External commands. Therefore, they are comparatively slower than internal commands in execution as they must be read from disk before they are executed. Since, they are not the part ofcommand.com, they can be listed by DIR command. All program files are external commands.
Some External commands, their syntax, and uses are:
- Command: UNDELETE (undelete.exe)
Syntax: UNDELETE [drive:] [path]
Use: This command is used to recall deleted files, directories and sub-directories.
- Command: SYS (sys.com)
Syntax: SYS [drive1:] [path] drive2
Use: This command is used to transfer system files from one disk to another.
- Command: EDIT (edit.com)
Syntax: EDIT
Use: This command is used to edit the existing text files or make a new file if you like.
- Command: MORE (more.com)
Syntax: DOS-command /MORE
Use: This command is used to display the output page by page instead of continuous scrolling or by full-screen text.
- Command: MOVE (move.exe)
Syntax: MOVE [drive:] [path] [drive:] [path]
Use: This command is used to move the files from one location to another.
- Command: XCOPY (xcopy.exe)
Syntax: XCOPY [drive:] [path] [/s] [/e] [drive:] [path]
Use: This command is used to copy the files, directories and sub-directories from one location to another.
Here,
s = copies directories and sub-directories except empty ones.
e = copies all directories and sub directories.
- Command: DOSKEY (doskey.com)
Syntax: DOSKEY [new DOS command = DOS command]
- Command: CHKDSK (chkdsk.exe)
Syntax: CHKDSK [drive:] [path] [/f] [/v]
Use: This command is used to check the drives for errors and display status report on any disk.
Here,
f = files error on the disk
v = report
- Command: FORMAT (format.com)
Syntax: FORMAT [drive:]
Use: This command is used to format disks.
- Command: DELTREE (deltree.exe)
Syntax: DELTREE [drive:] [path]
Use: This command is used to delete or remove a directory including all the files and sub-directories.
- Command: DISKCOMP
Syntax: DISKCOMP [drive1:] [drive2:]
Use: This command is used to compare between two diskettes.
- Command: /? (help)
Syntax: DOS Command /?
Use: This command or sign is used to get any type of help about DOS commands.
- Command: SCANDISK (scandisk.exe)
Syntax: SCANDISK [drive:]
Use: This command is used to check the status of C drive disk, fix errors if any and give the details report of disk drive.
- Command: LABEL (label.exe)
Syntax: LABEL [drive:]
Use: This command is used to display the disk drive volume label.
- ATTRIB (attrib.exe)
Syntax: ATTRIB [+/-] [H/R/S]
Use: This command is used to change the attributes of files.
Here,
|
Attributes |
Meaning |
|
+ |
Set the Attributes |
|
- |
Clear the Attributes |
|
H |
Hidden files |
|
R |
Read-only files |
|
S |
System files |
Differences between Internal commands and External commands:
|
Internal commands |
External commands |
|
They are built in the command.com file. |
They are coordinated by individual command files either having extension.exeor.com. |
|
They can be executed from any DOS prompt. |
The disk drive reads the content of each file before execution. |
|
These commands are not listed by DIR command. |
These commands can be listed by DIR command for being individual files. |
|
Example: DIR, CLS, MD, TYPE, etc. |
Example: CHKDSK, /?, FORMAT, ATTRIB, etc. |
Comments