Common DOS Commands

Subject: Computer Science

Find Your Query

Overview

Disk Operating System 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.
Common DOS Commands

INTRODUCTION

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

www.slideshare.net
www.slideshare.net

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.

(Karn & Pudasaini, 2015)

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.

(Shrestha & Khanal, 2013)

Bibliography

Karn, M. K., & Pudasaini, D. (2015). Computer Science I. Anamnagar, Kathmandu: Buddha Publication.

Shrestha, P. R., & Khanal, R. (2013). Computer Essentials I. Putalisadak, Kathmandu: Asmita's Publication.

Things to remember
  • Disk Operating System is a set of control programs.
  • There are 2 types of commands; Internal and External commands.
  • Internal commands refer to built-in commands.
  • Those commands that are on the disk as separate program files are called External commands. 
  • It includes every relationship which established among the people.
  • There can be more than one community in a society. Community smaller than society.
  • It is a network of social relationships which cannot see or touched.
  • common interests and common objectives are not necessary for society.

© 2019-20 Kullabs. All Rights Reserved.