Disk Operating System 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)

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)

We use disk operating systems (DOS) for several reasons, including −

  • File managementDOS 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 executionDOS 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 maintenanceDOS can be used for troubleshooting and repairing issues on older systems, as it provides a low-level interface to the hardware and file system.

  • Learning computing basics − Learning DOS commands is a good way to understand the basics of computing, including file systems, operating systems, and programming.

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 or Basic DOS commands are simple and essential commands that users can use to interact with the file system and execute simple tasks. Here are some examples of basic DOS commands −

  • DIR − Displays a list of files and directories in the current directory.

  • CD − Changes the current directory to a specified directory.

  • MD − Creates a new directory.

  • RD − Removes an empty directory.

  • COPY − Copies a file from one location to another.

  • DEL − Deletes a file.

  • REN − Renames a file or directory.

  • TYPE − Displays the contents of a text file.

  • ECHO − Displays messages or turns command echoing on or off.

  • VER − Displays the version number of the operating system.

  • DATE − Displays or sets the system date.

  • TIME − Displays or sets the system time.

  • CLS − Clears the screen.

  • PROMPT − Change the command prompt.

  • TREE − Displays a graphical representation of the directory structure.

  • FC − Compares two files or sets of files and displays the differences between them.

  • FIND − Searches for a specific string of text in a file or files.

  • FINDSTR − Searches for a specific string of text in a file or files, with advanced search options.

  • PATH − Displays or sets the system's path variable, which tells the system where to look for executable files.

  • SET − Displays or sets the values of environment variables, which are used by the system and other programs.

  • SHIFT − Changes the position of command line arguments.

  • SORT − Sorts the contents of a file alphabetically or numerically.

  • TIMEOUT − Pauses the command processor for a specified number of seconds.

  • VERIFY − Turns file verification on or off.

  • VOL − Displays the volume label and serial number of a disk

  • APPEND − Allows programs to open data files in specified directories as if they were in the current directory.

  • ASSOC − Displays or modifies file extension associations

  • ATTRIB − Displays or modifies the attributes of a file.

  • BREAK − Controls the handling of extended keyboard CTRL+C and CTRL+BREAK input.

  • CHCP − Displays or sets the active code page number.

  • CHKDSK − Checks a disk for errors and attempts to repair them.

  • CLIP − Redirects command output to the Windows clipboard.

  • COMP − Compares the contents of two files or sets of files.

  • CONVERT − Converts a FAT partition to NTFS.

  • DEBUG − Starts Debug, a command-line tool for testing and debugging executable programs.

  • DISKCOMP − Compares the contents of two floppy disks.

  • DISKCOPY − Copies the entire contents of one floppy disk to another.

  • DOSKEY − Provides command-line editing and recall capabilities.

  • FCBS − Sets the number of file control blocks used by the system.

  • GRAPHICS − Turns graphics mode on or off.

External DOS Commands

  • ATTR − Displays or changes file attributes.

  • BOOTCFG − Configures, queries, or changes in the system startup settings.

  • CHOICE − Allows for a choice to be made from a list of options.

  • CIPHER − Displays or changes the encryption of directories and files on NTFS volumes.

  • CMDKEY − Creates, lists, or deletes stored user names and passwords or credentials.

  • COMMAND − Starts a new instance of the command interpreter.

  • DEBUGGER − Starts the kernel debugger for debugging the operating system.

  • DEFRAG − Optimizes the file system and increases the performance of the computer.

  • DISKPART − Manages disks, partitions, and volumes from the command line.

  • DRIVERQUERY − Displays a list of installed device drivers.

  • EVENTCREATE − Writes an entry to the application event log.

  • EXIT − Exits the command interpreter or batch script.

  • FORMAT − Formats a disk for use with Windows.

  • FSUTIL − Displays or configures file and volume properties.

  • HELP − Provides help information for Windows commands.

  • IPCONFIG − Displays network settings information.

  • LINK − Creates hard links and symbolic links to files and directories.

  • MMC − Starts Microsoft Management Console, a system administration tool.

  • NBTSTAT − Displays statistics for NetBIOS over TCP/IP protocols.

  • NET − Manages network resources, such as computers, printers, and services.

  • OPENFILES − Displays information about open files and the users who opened them.

  • PACKAGER − Packages and unpackages files to and from CAB files.

  • PING − Verifies network connectivity.

  • RDPSIGN − Signs Remote Desktop Protocol (RDP) files.

  • REMOTEACCESS − Manages remote access connections and virtual private network (VPN) connections.

  • SC − Configures and manages Windows services.

  • SCHTASKS − Schedules commands and programs to run at specific times or events.

  • SFC − Scans and verifies the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions.

  • SHUTDOWN − Shut down or restart the local or remote computer.

  • TASKLIST − Displays a list of all running processes on the computer.

Dos and Don'ts for using DOS commands

  • Do use the correct syntax for each command. Most DOS commands have specific options and parameters that must be used correctly for the command to work as intended.

  • Don't use spaces in file or directory names. DOS commands treat spaces as delimiters between different parts of a command, so if you include a space in a file or directory name, you'll need to enclose the name in quotes.

  • Do use the TAB key to auto-complete filenames and directories. This can save you time and reduce errors.

  • Don't delete or modify system files unless you know what you're doing. Deleting or modifying system files can cause serious problems with your computer.

  • Do use the HELP command to learn more about a specific command. Most DOS commands come with detailed help information that can be accessed using the HELP command followed by the name of the command.

Common errors and how to avoid them

  • Misspelling command names or parameters. Always double-check your spelling and syntax before executing a command.

  • Forgetting to use quotes around filenames or directories with spaces. As mentioned earlier, DOS treats spaces as delimiters, so it's important to enclose filenames and directories with spaces in quotes.

  • Running commands from the wrong directory. Some commands may not work correctly if you're not in the correct directory. Always make sure you're in the right directory before executing a command.

  • Using the wrong command for the task at hand. Not all commands are appropriate for all tasks, so make sure you're using the right command for the job.

Conclusion

In conclusion, understanding DOS commands is still important today for several reasons. It allows users to perform various tasks more efficiently, troubleshoot issues on their computers, and automate repetitive tasks. Even though modern operating systems have graphical user interfaces, understanding DOS commands can still be useful for power users and IT professionals. In terms of the future of DOS commands, they will likely continue to exist in some form, although their importance may diminish as newer operating systems and interfaces are developed.

Updated on: 04-Apr-2023

23K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements