0% found this document useful (0 votes)
85 views9 pages

Chma - Dos Commands

Computer Hardware, Maintenance and Administration. Disk Operating System Commands with Types and examples.

Uploaded by

MOHAMMED FARAAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views9 pages

Chma - Dos Commands

Computer Hardware, Maintenance and Administration. Disk Operating System Commands with Types and examples.

Uploaded by

MOHAMMED FARAAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

DOS COMMANDS:

A disk operating system (DOS) is a type of operating system that manages data on a disk storage
device. It was widely used in the 1980s and 1990s, particularly on IBM-compatible personal
computers. Understanding DOS commands is essential for users who still rely on DOS for
certain tasks or for those who want to learn about the history of computing. DOS commands are
also useful for troubleshooting and fixing problems on older systems. The purpose of this article
is to provide an overview of basic and advanced DOS commands, as well as tips for using them
effectively.

Definition of Disk Operating System(DOS)

 DOS Commands are instructions that allow Windows users to conduct tasks on files and
folders. As you may know, a file is a container for a collection of information or data, and a
directory is a collection of files. These are case insensitive.
 A disk operating system (DOS) is a type of computer software that helps manage files and
data stored on a computer's disk drive.
 It is like the traffic cop for a computer's hard drive, organizing and directing the flow of
information.
 DOS used to be the primary operating system used on older computers, but nowadays it is
mostly used for specific tasks or for troubleshooting older systems.

Advantages of using Disk Operating System(DOS)

 File management − DOS provides a command-line interface for managing files and
directories on a disk storage device. It allows users to copy, move, rename, delete, and view
files and directories.
 Program execution − DOS allows users to execute programs or applications directly from
the command line. This was an important feature in the early days of computing
when graphical user interfaces (GUIs) were not yet widely available.
 Troubleshooting and system maintenance − DOS can be used for troubleshooting and
repairing issues on older systems, as it provides a low-level interface to the hardware and
file system.

Features of DOS
There are various features of the disk operating system. Some features of the
operating system are as follows:
1. It is a free OS.
2. It doesn't support GUI.
3. It is a single-user OS.
4. It is a 16-bit OS.
5. The mouse could not be used to operate it, i.e., the input is provided via the
basic system commands.
6. It aids make file management, e.g., creating, editing, deleting files, etc.
7. It has a text-based interface and relies on text and codes to function.

Types of DOS Commands

 Internal Commands − Internal commands are the commands that are built into the
command interpreter or the command prompt of the DOS operating system. These
commands do not require a separate executable file to run and can be used directly from
the command prompt.

 External Commands − External commands in DOS are commands that are not built into
the command interpreter, but are separate executable files that need to be located in the
system's path or directory to be executed from the command prompt. External commands
are usually more complex and are used for more advanced tasks than internal commands.

Internal DOS Commands:

Internal commands are built into the command interpreter (usually COMMAND.COM or
CMD.EXE) and are loaded into memory when the operating system starts. These commands
don't require a separate executable file, and they are executed directly by the command
interpreter. Here are some common internal DOS commands:

1. DIR:

 Function: Lists the files and directories in the current directory.

 Example: dir

2. CD (Change Directory):

 Function: Changes the current working directory.

 Example: cd new_directory
3. COPY:

 Function: Copies files from one location to another.

 Example: copy file1.txt destination

4. DEL (Delete):

 Function: Deletes one or more files.

 Example: del filename

5. REN (Rename):

 Function: Renames a file or directory.

 Example: ren oldname.txt newname.txt

6. MD or MKDIR (Make Directory):

 Function: Creates a new directory.

 Example: mkdir new_directory

7. RD or RMDIR (Remove Directory):

 Function: Removes an empty directory.

 Example: rmdir directory_name

8. TYPE:

 Function: Displays the content of a text file.

 Example: type filename.txt

9. CLS (Clear Screen):

 Function: Clears the command prompt screen.

 Example: cls

10. EXIT:

 Function: Exits the command prompt or script.

 Example: exit
External DOS Commands:

External commands are separate executable files (.COM or .EXE) that reside as standalone
programs on disk. These commands are loaded into memory only when they are executed and
are separate from the command interpreter. Here are some common external DOS commands:

1. FORMAT:

 Function: Formats a disk or storage device.

 Example: format C:

2. CHKDSK (Check Disk):

 Function: Checks a disk for errors and repairs them.

 Example: chkdsk C:

3. XCOPY:

 Function: Copies files and directory trees with additional options.

 Example: xcopy source destination /e

4. TREE:

 Function: Displays the directory tree structure.

 Example: tree

5. ATTRIB (Attribute):

 Function: Displays or changes file attributes.

 Example: attrib +r -s filename

6. EDIT:

 Function: Opens a simple text editor for editing text files.

 Example: edit filename.txt

7. DEBUG:

 Function: A low-level debugging tool for examining and altering memory and
files.
 Example: debug filename.exe

8. DISKCOPY:

 Function: Copies the entire contents of one disk to another.

 Example: diskcopy A: B:

9. MORE:

 Function: Displays the contents of a text file one screen at a time.

 Example: more filename.txt

10. PING:

 Function: Sends a network request to a specific IP address or domain.

 Example: ping example.com


DOS (Disk Operating System) commands provide a command-line interface for interacting with
the operating system in systems running MS-DOS or similar environments. Here is a list of some
commonly used DOS commands:

1. CD (Change Directory):

 Change the current directory.

 Example: cd directory_name

2. DIR (Directory Listing):

 Display a list of files and directories in the current directory.

 Example: dir

3. COPY:

 Copy files from one location to another.

 Example: copy source_file destination

4. DEL (Delete):

 Delete one or more files.

 Example: del filename

5. REN (Rename):

 Rename a file or directory.

 Example: ren old_filename new_filename

6. MKDIR (Make Directory):

 Create a new directory.

 Example: mkdir directory_name

7. RMDIR (Remove Directory):

 Remove a directory.

 Example: rmdir directory_name

8. TYPE:

 Display the contents of a text file.


 Example: type filename.txt

9. CLS (Clear Screen):

 Clear the command prompt screen.

 Example: cls

10. EXIT:

 Close the command prompt window.

 Example: exit

11. FORMAT:

 Format a disk.

 Example: format drive_letter:

12. CHKDSK (Check Disk):

 Check a disk for errors and fix them.

 Example: chkdsk drive_letter:

13. COPY CON:

 Create a new text file directly from the command prompt.

 Example: copy con filename.txt

14. TREE:

 Display the directory tree structure.

 Example: tree

15. XCOPY:

 Copy files and directory trees.

 Example: xcopy source destination /options

16. VER:

 Display the version number of the operating system.


 Example: ver

17. DATE:

 Display or set the system date.

 Example: date or date mm-dd-yyyy

18. TIME:

 Display or set the system time.

 Example: time or time hh:mm:ss

19. ECHO:

 Display messages or enable/disable the echoing of commands.

 Example: echo Hello, World!

20. SET:

 Set or display environment variables.

 Example: set variable_name=value

21. ASSOC:

 Display or modify file extension associations.

 Example: assoc

22. ATTRIB (Attribute):

 Display or change file attributes.

 Example: attrib +r -s filename

23. FC (File Compare):

 Compare the contents of two files.

 Example: fc file1.txt file2.txt

24. FIND:

 Search for a specific text string in files.


 Example: find "search_text" filename.txt

25. PATH:

 Display or set the command search path.

 Example: path or path c:\new_directory

26. PROMPT:

 Change the command prompt text.

 Example: prompt $p$g

27. RENAME:

 Rename a file or directory.

 Example: rename old_filename new_filename

28. SHIFT:

 Shift the position of replaceable parameters in a batch file.

 Example: shift

29. SORT:

 Sort the lines of a text file.

 Example: sort filename.txt

30. SUBST:

 Associate a path with a drive letter.

 Example: subst drive_letter: path

You might also like