Introduction
Disk Operating System, or DOS for short, is an operating system used on personal computers from the early 1980s until the mid-1990s. It was the first widely-used operating system for personal computers and is still used in some limited applications.
What is Disk Operating System?
DOS is a command-line interface that allows users to interact with their computer by typing commands into a command prompt. This means that instead of using a mouse and clicking on icons, users must type in commands to get their computer to do what they want.
Why was Disk Operating System important?
DOS is known for its simplicity and efficiency. It was the foundation for later operating systems like Microsoft Windows. Windows superseded DOS in the mid-1990s, but its legacy is still felt in modern computing.
Features of Disk Operating System
Single Tasking
As mentioned earlier, DOS is a single-tasking operating system that can only run one program simultaneously. This limitation means that users must wait for a program to finish before starting another program.
Multitasking
Some versions of DOS support limited multitasking capabilities. This feature allows users to run multiple applications simultaneously. However, multitasking on DOS is less efficient than on modern operating systems.
User Interface
DOS’s user interface provides users access to the system’s resources. The user interface on DOS is typically a command-line interface (CLI). This interface requires users to enter text commands to interact with the system.
Command Line Interface
The CLI on DOS allows users to execute commands to interact with the system. Commands on DOS are typically short and easy to remember. For example, the command to display a directory listing is “dir,” and the command to change the current directory is “cd.”
The Rise of Graphical User Interface (GUI)
Graphical user interfaces (GUIs) have risen in popularity, making DOS less important. GUIs provide users with a more user-friendly interface than CLI. Modern operating systems like Linux, macOS, and Windows use GUI.
The Decline of DOS
More modern operating systems have primarily replaced DOS. However, some legacy applications still require DOS to run. Additionally, some people still use DOS for its simplicity and compatibility with older hardware.
The Continued Relevance of DOS
DOS still has some relevance today, especially in the embedded systems industry. Embedded systems are those systems that are designed to perform a specific task. Many embedded systems use DOS because of its small footprint and compatibility with older hardware.
Internal and External Commands of Disk Operating System
Disk Operating System commands can be divided into two categories: internal and external commands.
Internal Commands
Internal commands are built into the DOS operating system and are always available. These commands are loaded into memory when the operating system is booted up and do not require external files.
Some common internal commands include:
DIR
The DIR command is used to display a list of files and subdirectories in a directory. To use DIR, enter the command followed by any necessary parameters and the directory path. For example:
Dir c:\
CD
The CD command helps to change the current directory. To use CD, enter the command followed by the current directory name you want to change to.
For example:
cd c:\windows
MD
The MD command is used to create a new directory. To use MD, enter the command followed by the directory name you want to create. For example, to create a directory named “newdir”, you would enter:
md newdir
REN
The REN command is used to rename a file or directory. To use REN, enter the command followed by the current name of the file or directory and the new name.
For example:
ren myfile.txt newfile.txt
TYPE
The TYPE command displays the content of a text file. To use TYPE, enter the command followed by the file name you want to view. For example:
type myfile.txt
COPY
The COPY command is helps us to copy one or more files from one location to another. To use COPY, enter the command followed by the source file(s) and the destination directory. For example:
copy myfile.txt c:\myfolder
VER
The version number of the operating system can be shown by using VER command. To use VER, enter the command:
ver
TIME
The system time can be shown or changed using the TIME command. To use TIME, type the command in the format hh:mm:ss, followed by the time you want to set. For example, you would enter the following to set the time to 9:30 AM
time 09:30:00
DATE
To system date can be shown or changed by using DATE command. To use DATE, enter the command followed by the date you want to set in mm-dd-yy format. For example, to set the date to January 1, 2022, you would enter:
date 01-01-22
CLS
To clear the screen we are using CLS command. To use CLS, enter the command:
cls
EXIT
The EXIT command is used to exit the command prompt or batch file. To use EXIT, enter the command:
exit
SET
The SET command is used to set an environment variable. To use SET, enter the command followed by the variable’s name and the value you want to assign to it. For example, to set a variable named MYVAR to the value “hello”, you would enter the following:
set MYVAR=hello
DEL
The DEL command is used to delete one or more files. To use DEL, enter the command followed by the file name or files you want to delete. For example, to delete a file named “oldfile.txt”, you would enter:
del oldfile.txt
RD
The RD command is used to remove a directory. To use RD, enter the command followed by the directory name you want to remove. For example, to remove a directory named “olddir”, you would enter:
rd olddir
External Commands
External commands are not built into the operating system and require external files to be present. These commands are located in separate files, which are loaded into memory when the command is executed.
Some common external commands include:
FORMAT
The FORMAT command is used to format a disk. To format a disk, enter the drive letter followed by a colon and any necessary parameters. For example:
format c: /s
The “/s” parameter creates a system disk on the formatted drive.
TREE
The TREE command displays the directory structure of a drive or directory. Enter the drive letter or directory name after the command to display the directory structure. For example:
tree c:/
XCOPY
The XCOPY command is used to copy files and directories. To copy a file or directory, enter the source filename or directory name, followed by the destination filename or directory name. For example:
xcopy c:\myfiles d:\backup /s /e
The “/s” parameter copies all subdirectories, and the “/e” parameter copies empty subdirectories.
CHKDSK
The CHKDSK command is used to check a disk for errors. To check a disk, enter the drive letter followed by a colon and any necessary parameters. For example:
chkdsk c: /f
The “/f” parameter fixes any errors found on the disk.
DISKCOPY
To copy the contents of one disk to another we are using DISKCOPY command. To copy a disk, enter the source drive letter followed by a colon and the destination drive letter followed by a colon. For example:
diskcopy a: b:
ATTRIB
The ATTRIB command is help us to change the attributes of a file or directory. To change the attributes, enter the filename or directory name followed by any necessary parameters. For example:
attrib +h myfile.txt
The “+h” parameter sets the “hidden” attribute for the file.
FDISK
The FDISK command help us to create and manage disk partitions. To use FDISK, enter the command followed by any necessary parameters. For example:
fdisk /mbr
The “/mbr” parameter writes a new master boot record to the disk.
DISKCOMP
The DISKCOMP command help us to compare the contents of two floppy disks. To use DISKCOMP, enter the command followed by the source and destination drive letters. For example:
diskcomp a: b:
DISKPART
The DISKPART command is used to manage hard disks, partitions, and volumes. To use DISKPART, enter the command followed by any necessary parameters. For example:
diskpart
This will open the DISKPART command prompt, where you can enter commands to manage your disks.
FC
The FC command compares two or sets of files and displays the differences between them. To use FC, enter the command followed by the names of the files you want to compare.
For example:
fc file1.txt file2.txt
LABEL
The LABEL command is used to change the volume label of a disk. To use LABEL, enter the command followed by the drive letter and the new volume label.
For example:
label c: MyDisk
MORE
The MORE command is used to display a text file’s contents one screen at a time. To use MORE, type the command followed by the filename you want to view.
For example:
more myfile.txt
SORT
The SORT command is used to sort the contents of a text file. To use SORT, enter the command followed by the file name you want to sort.
For example:
sort myfile.txt
SYS
The SYS command transfers the system files to a disk so it can be booted. To use SYS, enter the command followed by the drive letter of the destination disk.
For example:
sys c: