Start from here-DoS (basic )!!

Source: Internet
Author: User

Recently, many of my friends have encountered dos problems !! I will introduce you here!
(Due to the backward compatibility of Microsoft products, Windows needs to be built on the basis of DOS, and due to various unstable factors in the Windows system, even if Microsoft claims that Windows NT/2000 is extremely stable, it often suffers some faults that are hard to fix. At this time, it has to use DOS to solve these problems. Therefore, to become a master, you must understand dos ......... ) DoS Overview
Disk Operating System (DOS) is a widely used disk operating system. Even the popular Windows 9x/me system is based on it.

There are two common dos types: PC-DOS of IBM and MS-DOS of Microsoft, which have the same function and command usage format, which we commonly use is MS-dos.

Since the advent of DOS in 1981, the version has been constantly updated, from the initial dos1.0 to the latest dos8.0 (Windows ME system), the highest version of pure DOS is dos6.22, later versions of DOS are provided by Windows systems and do not exist independently. The following describes how to use the DOS Windows 98 4.10.2222a dos7.0 system.

Basic dos knowledge

1) DoS Composition
DOS is divided into core bootProgramAnd the command program.

DOS core boot programs include boot system boot programs, Io. sys, msdos. sys, and command. com. They are the most basic components of the DOS system, and can be started with their systems.

However, simply starting a program does not work. As a ready-to-use operating system, DOS generally performs operations through commands. Doscommands include internal commands and external commands. Internal commands are some common command programs that occupy little space, such as Dir and CD. They exist in command. COM files are loaded into the memory at system startup for convenient calling. Some other external commands exist as separate executable files and are transferred to the memory only during use.
(TIPS: executable program files include *. COM and *. EXE. Generally ,*. the EXE file is the software executable program, and *. COM file is a command program)

2) DOS system prompt
After DOS is started, "C:>" and a flashing cursor are displayed. This is a DOS system prompt, which indicates the drive letter and directory of the current system, we can enter "[drive letter]:" for conversion, such as "A:" and "E :". Note that the input drive letter must exist.
(Knowledge: drive letter from A to Z, usually drive a and drive B is a soft Drive, drive letter from C, and drive letter is the last)

3) files and directories
Data in the computer is mainly stored in the form of files. It can also be said that DOS manages data in the form of files.
A file is a collection of related data, and several data together form a file. Each file has a file name. The file name consists of the primary file name and the suffix, separated by small dots. Dos6.22 and earlier versions support a maximum of 8-character primary file names and 3-character suffix names, while Windows 95 dos7.0 supports 128-character primary file names and suffix names. Letters, Chinese characters, numbers, and some special symbols such "! , @, # "Can all be used as file names, but cannot have"/, \, | ,:,? .

We can see the type of the file through the extension name of the file, for example:

Suffix file type

EXE executable program file

COM executable command file

Bat executable batch file

Dat Data File

TXT text file

Bak backup file

Sys System File

To facilitate operations, DOS also allows wildcard characters. The wildcard is "? The two symbols "and" * "can be used to replace some characters in the file name. "? "Represents a valid or empty character, such as" AB? D. EXE files can represent "ABCD. EXE", "abdd. EXE", and "abzd. EXE.

"*" Indicates several characters. For example, "*. Bat" indicates all files suffixed with "Bat" in the current directory.
DOS manages disks in the form of a directory tree. The directory here is equivalent to a folder in windows. Like folders, directories form a tree layer by layer. The lowest-level directory in a drive letter is the root directory, and all directories under the root directory are called its subdirectories. The root directory is represented by "\", and the top-level directory of a directory is represented "... We can use the path to find a file or directory. The path is the same as the address, which allows you to conveniently and accurately search. For example, "C: \ WINDOWS \ command \ deltree.exe" is the path of a file.

Files or directories with the same name are not allowed in the same directory.

DOS Internal commands

DOS Internal commands are the basis for operations.

1) dir -- display information of all files or directories in the specified path
The format is "dir [drive letter:] [path] [file name] [parameter]", for example, "dir E: \ ff. m3u ". Enter and press enter to display the relevant information (1 ). In addition, it has several parameters:

/W: display on the wide screen. Five file names are displayed in a row without the modification time, file size, and other information;
/P: displays information by page. You can use it to display information by page;
/A: displays files with special attributes. The attributes include "H" hidden and "R" read-only. You can enter "dir *. */AH "to display all files with hidden properties in the current directory;
/S: displays all the files in the current directory and Its subdirectories. With this parameter, we can search for a file or directory. For example, we can go to "C:> enter "dir *. dat/s to find all files with the suffix dat in drive C.

Several parameters can be used at the same time, such as "dir *. com/W/P/S ".

2) MD -- create a directory
The format is "MD [drive letter] [path]", for example, "MD Temp ".
Note: This command can only create one directory at a time.

3) RD -- delete a directory
The format is "RD [drive letter] [path]".
Note: This command can only delete empty directories and cannot delete the current directory.

4) CD -- enter the specified directory
The format is "CD [path]", for example, "CD happy ".
Note: You can only enter the directory in the current drive letter. "CD \" is returned to the root directory, and "CD .." is returned to the previous directory.

5) copy-copy an object
The format is "copy [Source directory or file] [destination directory or file]", for example, "Copy c :\*. com D: \ ", we can also enter" Copy c: \ command. com D: \ command. bak to copy and rename the file.
Note: When you use this command to copy files, the target directory must exist.

6) del -- delete an object
The format is "del [drive letter] [path] [file name] [parameter]", for example, "del c: \ data \ *. Bak ". It has a parameter: "/P", which enables users to display deletion inquiries for each file when deleting multiple files.

7) Ren -- rename
The format is "Ren [original name] [current name]". In Versions later than 7.0, DOS supports modification of file names and directory names. In the past, DOS only allowed modification of file names.

8) type -- display text files
The format is "type [file name]". You can view text files.

The above are some common internal commands. In addition, there are some internal commands, for example, "CLS" clear screen command, "Time" display or change the current time, "date" display or change the current date, and "Ver" display the system version number. Using these internal commands can perform basic operations on DOS and master them as a prerequisite for complex operations.

DOS External commands

dos External commands are some applications that make your operations more convenient and in-depth.
1) format (format. com) -- format command.
for example, "format A:/s ". It has two common parameters:
/Q: Quick formatting;
/S: complete formatting and copy the system boot file to the disk.
2) edit (edit. com) -- edit command.
3) sys (SYS. com) -- system boot file transmission command.
4) attrib (attrib. EXE) -- File Attribute setting command.
5) xcopy (xcopy. EXE) -- Copy command
6) Scandisk (Scandisk. EXE) -- Disk scan program.
7) chkdsk (chkdsk. EXE) -- disk check command.
8) Move (move. EXE) -- file movement command.
9) deltree (deltree. EXE) -- delete command.
10) fdisk (fdisk. EXE) -- partition command.
the above are some common dos External commands, which are listed here for the convenience of your dos, so that you can get to know him again !! Because he is the basis of the current win system! All problems can be solved in DOS !! So that everyone can have some ideas and solutions to the problem! (This is purely personal nonsense !) Haha !!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.