DEFINITION

DOS (disk operating system)

A DOS, or disk operating system, is an operating system that runs from a disk drive. The term can also refer to a particular family of disk operating systems, most commonly MS-DOS, an acronym for Microsoft DOS.

An operating system (OS) is the software that controls a computer's hardware and peripheral devices and allows other software programs to function. Early computers of the 1940s and 1950s did not have disk drives. Instead, they were hard-wired to carry out specific computations.

Later, computers were able to store instructions loaded into the computer's memory using punch cards and then, after that, magnetic tapes. Computer memory space was limited, and when the instructions to control a computer were moved onto a disk drive, such as a floppy disk or internal HDD, it was considered cutting-edge technology.

DOS is also used to describe several similar command-line disk operating systems. Early computers, such as the Commodore 64, Atari 800 and Apple II, all featured a disk operating system, including Commodore Business Machines DOS, Atari DOS and Apple DOS, respectively. DOS/360 was an OS for IBM mainframes, which first appeared in 1966, but it is unrelated to the 8086-based DOS of the 1980s.

How does a disk operating system work?

When a computer is powered on it goes through various steps called the boot process. For a computer running a disk operating system, the following six steps are standard:

The read-only memory (ROM) bootstrap loader reads the Master Boot Record and passes control over to it.

The boot record loads the disk operating system into memory, and it takes control of the machine.

The computer transfers data stored on a magnetic disk to its main memory, the random access memory.

It also transfers data to external devices attached to the computer, such as a computer screen or printer.

The computer provides various application programming interfaces for programs like character input/output (I/O), memory management, program loading and termination, as well as handling input from the user through a keyboard.

The OS also provides file management that organizes, reads and writes files on storage. The files are organized in a hierarchical structure of directories, subdirectories and files.

A disk operating system doesn't have a graphical user interface (GUI). Its interface is character-based, so users must type commands in the command line to indicate what actions they want.

PC-DOS 2.0 startup screen

An example of a PC-DOS 2.0 startup screen on an early IBM PC shows the command-line interface.

DOS features

Among the features and limitations of disk operating systems are the following.

Features

Command-line interface (CLI). It does not have a GUI and doesn't accept mouse inputs. It is a character-based interface system where all commands are entered in text at the command-line prompt.

Management. A disk operating system can manage a computer's files, I/O system and its memory.

Limitations

No built-in security. It does not have built-in security, such as file ownership and permissions.

No multiusers or multitasking. It also does not support multiusers or multitasking. It is only able to run one program at a time, but it provides direct access to the basic I/O system and underlying hardware.

Challenging interface. The CLI, in which a user must type in commands, requires the user to remember commands to run programs and do other OS tasks. This approach makes it difficult for novices to use. For example, typing the command cd \directory_name changes the current working directory to the named directory and typing the command dir lists the files in the current directory.

Common DOS commands

MS-DOS is not case-sensitive, so commands can be typed in either uppercase or lowercase. However, other disk operating systems have case-sensitive CLIs. DOS commands include the following.

cd Changes directory Type cd c:\techtarget in the command line to change the working directory to c:\techtarget.

cls Clears all the contents on the screen, leaving only the command prompt Type cls in the command line.

copy Copies one or more files to another location

Type copy c:\techtarget\file.txt c:\techtarget\file2.txt to copy c:\techtarget\file.txt to c:\techtarget\file2.txt.

del Deletes one or more files

Type del c:\techtarget\file2.txt to delete the file file.txt from the directory c:\techtarget.

deltree Deletes all files and subdirectories from a computer

Type deltree c:\techtarget\drafts to delete the directory drafts, including all files and subdirectories contained in it.

dir Displays a list of files and directories in a directory

Type dir c:\techtarget to display a list of files and directories in the directory c:\techtarget.

format Formats a disk for DOS files Type format e: to format the disk in drive e: for use with DOS.

help Lists the available commands or more information about a specific command

Type help del to display information about the del command and how to use it. Most commands have optional switches that are explained in the help information.

mkdir or md Creates a new subdirectory Type mkdir c:\techtarget\drafts to create the subdirectory drafts in the c:\techtarget directory.

move Moves files or directories from one directory to another or from one drive to another

Type move c:\techtarget\file.txt c:\techtarget\drafts\file.txt to move c:\techtarget\file.txt to c:\techtarget\drafts\file.txt.

ren or rename Changes the name of a file or directory

Type ren c:\techtarget\file.txt c:\techtarget\file2.txt to rename the file c:\techtarget\file.txt to c:\techtarget\file2.txt.

type Displays the contents of a file on the screen

Type type c:\myfile.txt to show the contents of the myfile.txt file.

A wildcard character that represents one or more characters a group of files has in common

Type copy c:\techtarget\.txt c:\techtarget\drafts to copy all files with the extension of .txt to c:\techtarget\drafts.

? A wildcard character that represents a single character a group of files has in common

Type copy c:\techtarget\document?.txt c:\techtarget\drafts to copy files named document1.txt, document2.txt and so on to c:\techtarget\drafts.

History of DOS

The arrival of the microprocessor in the 1970s started a computing revolution, and the market for personal computers (PCs) began to boom. IBM, which was known at the time for its mainframes, released the IBM 5150 Personal Computer in August 1981. To speed up the development of this new computer, IBM decided to license various components from other companies.

Its first choice for an OS was the CP/M-86 software from Digital Research (DR). However, disagreements over nondisclosure agreements and licensing led IBM to choose a CP/M-like OS from Microsoft. Microsoft bought the rights to market 86-DOS, an OS based on the Intel 8086 16-bit processor. 86-DOS was created by Tim Paterson at Seattle Computer Products (SCP) and was originally called QDOS, an acronym of Quick and Dirty OS.

After leaving SCP for Microsoft in 1981, Paterson worked on the PC-DOS version of 86-DOS for IBM's PC. PC-DOS was the first widely installed DOS used in PCs running on Intel 8086 16-bit processors.

DOS Commands

DOS Commands are instructions to perform tasks on files and directories very useful to Windows users. DOS commands are case insensitive. And as you already know, the file is the area where we store a group of information or data, and the collection of a group of files is called a directory.

In MS-DOS the file name follows 8dot format and is divided into two parts – primary name and secondary name. The primary name is up to 8 characters long and the secondary name is up to 4 characters with a dot. For example, in the file-name Logo.jpg, Logo is the primary name and .jpg is the secondary name. Secondary names are fixed for a particular type of file, meaning for system files the secondary name is designated as .sys, for text files it is .txt and so on. To name a file or directory special characters like < > , . / * ? | & Space are not allowed. Here is the list of some of the important types of files with their default secondary names:

Text file

.txt

Command file

.com

System file

.sys

Program file

.prg

Database file

.dbm

Library file

.lib

Batch file

.bat

Executable file

.exe

Why are internal and external commands needed?

Internal commands are more commonly used and important to the operation and use of the Windows operating system. By embedding them in the command.com file, they can be quickly accessed and always available in MS-DOS and to Windows when needed.

External commands are powerful. They help fix problems, improve performance, and perform other actions as well. External commands usually have higher resource requirements than internal commands. Keeping them in separate files, separated from internal commands, helps to reduce the load on Windows. They can also be added to Windows whenever needed by copying the external command’s file to the computer.

DOS Commands are divided into 2 types:

Internal Commands

Internal Commands are built into the operating system as the part of a file called COMMAND.COM

When you type an Internal Command MS-DOS will perform it immediately. All of the internal commands are part of the shell which could be command.com or cmd.exe (depending on your version of MS-DOS or Windows) and are not separate files on the hard drive. As long as you can open a command line you can run any of the internal commands included with your version of MS-DOS

Example Of Ms-dos Internal Command Are:

CLS – It is a command that allows you to clear the complete contents of the screen and leave only a prompt.

BREAK – Break can be used to enable or disable the braking capability of the computer.

REN – It is used to rename files and directories from the original name to a new name.

CHDIR – Chdir (change directory) is a command used to switch directories in MS-DOS.

EXIT – The exit command is used to withdrawal from the currently running application and the MS-DOS session.

RMDIR – Removes an empty directory in MS-DOS.

DEL- Del is a command used to delete files from the computer.

COPY – Allows you to copy one or more files to an alternate location.

VOL – Displays the volume of information about the designated drive.

TYPE- Display the contents of a text file.

DATE – The date command can be used to look at the current date of the computer as well as change the date to an alternate date.

TIME – Allows the user to view and edit the computer’s time.

DIR – The dir command displays information about files and directories, and how many spaces available.

SET – Allows you to change one variable or string to another.

MKDIR/MD – Allows you to create directories in MS-DOS.

PATH – Path is used to specify the location where MS-DOS looks when using a command.

DISKCOMP- Comparing two diskettes.

DISKCOPY- Copying a diskette.

RD- Remove a directory.

External Commands

These external commands are for performing advanced tasks and they do need some external file support as they are not stored in COMMAND.COM.There are also Batch commands or Batch files which are text files that contain a list of internal and/or external commands which are executed in sequence when the batch file is executed. AUTOEXEC.BAT gets executed automatically on booting.

Examples of External Commands are:-

DELTREE- Short for delete tree, deltree is a command used to delete files and directories permanently from the computer.

TREE- Allows the user to view a listing of files and folders in an easy to read the listing.

PRINT – The print command allows users to print a text file to a line printer, in the background.

FIND – Allows you to search for text within a file.

XCOPY – Xcopy is a powerful version of the copy command with additional features; has the capability of moving files, directories, and even whole drives from one location to another.

DISK COMP- Compares the contents of a floppy disk in the source drive to the contents of a floppy disk in the target drive.

FORMAT – Format is used to erase information off of a computer diskette or fixed drive.

ATTRIB – Attrib allows a user to change the attributes of a file or files.

SORT- Sorts the input and displays the output to the screen.

CHKDSK- Chkdsk is a utility that checks the computer’s hard drive status for any cross-linked or any additional errors with the hard drive.

FORMAT – Format a diskette.

PRINT – Printing a file.

MOVE- Allows you to move files or directories from one folder to another, or from one drive to another.

How useful was this post