DOS common command (1)

xiaoxiao2021-03-06  27

A) MD - build a subdirectory

1. Function: Create a new subdirectory

2. Type: internal command

3. Format: MD [Drive:] [Path Name]

4. Instructions for use:

(1) "Drive": Specifies the disk drive letter to establish a subdirectory, if omitted, is the current drive;

(2) "path name": The superior directory of the subdirectory to be established, if the default is built in the current directory.

Example: (1) Creating a subdirectory named Fox in the root of the C DC; (2) Create a USER subdirectory in the fox subdirectory.

C:,> MD Fox (creating a subdirectory in the current drive C)

C:,> MD Fox, User (create a USER subdirectory in the fox subdirectory)

(2) CD - change the current directory

1. Function: Show current directory

2. Type: internal command

3. Format: CD [Drive:] [Path Name] [subdirectory name]

4. Instructions for use:

(1) If the path and sub-directory names are omitted, the current directory is displayed;

(2) If the "CD," format is used, it will be returned to the root directory;

(3) If the "CD .." format is used to return to the previous directory.

Example: (1) Go to the User subdirectory; (2) Return to the subdirectory from the USER subdirectory; (3) Return to the root directory.

C:,> CD Fox, User (enter the user subdirectory under the Fox subdirectory)

C:, fox, user> cd .. (Return to the previous root directory)

C:, fox> CD, (return to the root directory)

C:,>

(3) RD - Delete subdirectory command

1. Function: Deleted the directory from the specified disk.

2. Type: internal command

3. Format: RD [Path:] [Path Name] [Subnatal Name]

4. Instructions for use:

(1) The sub-directory must be empty before deleting, that is to say, you need to enter the subdirector, use the DEL (command to delete the file) to delete the files in its subdirectory, and then return to the previous directory, Use the RD command to delete the directory itself;

(2) You cannot delete the root directory and the current directory.

Example: Requirements to delete the user subdirectory under the C disk fox subdirectory, the operation is as follows:

Step 1: First remove the files in the User subdirectory;

C,> DEL C:, FOX, User, *. *

Step 2, delete the USER subdirectory.

C,> RD C:, FOX, User

(4) DIR - Display Disk Directory Command

1. Function: Displays the contents of the disk directory.

2. Type: internal command

3. Format: DIR [Drive] [Path] [/ P] [/ W]

4. Instructions for use: / P Use; when you want to view too much, you can't see the screen on one-screen display, you will not be easy to see, add / P, you will display 23 lines on the screen. File information, then pause, and prompt; use of Press Any Key to Continue / W: Plus / W Only the file name is displayed, as for the file size and the date and time of the establishment, it is omitted. After adding the parameters, each line can display five file names.

Path - Path Settings Command

1. Function: The search path of the device executable file is only valid for the file.

2. Type: internal command

3. Format: Path [Disk 1] Directory [Path Name 1] {[; Disk 2:], ...}

4. Instructions for use:

(1) When running an executable file, the DOS will first search the file in the current directory. If you find it; if this file is not found, the path set by the Path command, order to the directory Search the file;

(2) The path in the path command. If there are two or more, each path is separated;

(3) There are three use methods: path command:

Path [Disk 1:] [Path 1] [Path 2:] [Path 2] ... (Setting the search path of the executable)

PATH: (Cancel all paths)

PATH: (Show the path set ")

(6) TREE - Display Disk Directory Structure Command

1. Function: Displays all directory paths on the specified drive and all file names in these directories.

2. Type: External Command

3. Format: Tree [Drive:] [/ f] ["PRN]

4. Instructions for use:

(1) Display all files and directory all files, omitted, and only the directory is displayed, and the files in the directory are displayed;

(2) When selecting> PRN parameters, print the file name in the listed directory and directory.

(7) DELTREE - Delete the entire directory command

1. Function: Remove the entire directory and subordinate subdirectories and files.

2. Type: External Command

3. Format: Deltree [Disk]

4. Instructions: This command can be deleted in one step and remove all files, subdirectory, and lower subdirectory, and regardless of the property of the file as hidden, system or read only, as long as the file is located in the deleted directory Under the Deltree, you will be deleted. Be careful when using it! ! !

V. Disk operation class command

(1) Format - disk format command

1. Function: Format, divide the tracks and sectors on the disk; at the same time check the tracks with non-defective tracks on the entire disk, the bad track is marked; establish a directory area and file allocation table, make the disk to receive DOS preparation .

2. Type: External Command

3. Format: Format [/ s] [/ 4] [/ q]

4. Instructions for use: (1) The drive letter after the command cannot be default. If the hard disk is formatted, it will be as follows: Warning: All Data On Non --Removable Disk

Drive C: Will Be Lost!

Proceed with format (y / n)?

(Warning: All data is on the C drive, will it be lost, is it really formatted?)

(2) If it is formatted to the floppy disk, you will be prompted as follows: INSERT MEW Diskette for Drive A;

And press Enter When Ready ...

(Insert a new disk in a A drive, ready to press Enter).

(3) Select the [/ S] parameter, copy the DOS system files IO.SYS, MSDOS.SYS, and Command.com to disk so that the disk can be used as a DOS boot disk. If you do not choose / s parameters, the formatted 磙磙 can only read and write information, and cannot be used as a startup disk;

(4) Select the [/ 4] parameters, format 360kB low density disk in a 1.2MB high-density software drive;

(5) Select the [/ Q] parameter, quickly format, this parameter does not re-divide the magnetic track lounge and sector, only the disk root directory, file allocation table, and the boot sector are cleared, so format The speed is faster.

(6) Select the [/ u] parameters, indicating that there is unconditional format, that is, destroying all the data on the original disk. Do not add / u, it is safely formatted. At this time, set a mirror file to save the original FAT table and root directory, if necessary, use unforrmat to restore the original data.

(2) Unformat recovery formatted command

1. Function: Recovery for disk that is lost to malfunction data.

2. Type: External Command

3. Format: unformat [/ L] [/ u] [/ p] [/ test]

4. Instructions: Used to recover the disk that will be formatted by "non-destructive". When the deleted file or subdirectory and disk system sector (including FAT, root directory, Boot sector, and hard disk partition table) are damaged, you can also use unformat to rescue.

(1) Select the / l parameter to list the information found by the sub-directory name, file name, Daxia dates, but not really format work.

(2) Select / P parameters will be sent to the screen (including / L parameter) at the same time. Runtime screen will display: "Print Out Will Be Sent To LPT1"

(3) Selecting the / TEST parameter to do only the simulation test (TEST) does not do a real write action. Use this parameter screen to display: "Simulation Only"

(4) Selecting the / U parameter Do not use the data of the mirror image file, directly unformat according to the current status of the disk.

(5) Select / PSRTN; repair the hard disk partition table.

If one of / p, / l, / test after the drive is equivalent to using the / u parameter, unformat will "assume" that the disk does not have the mirror image file.

转载请注明原文地址:https://www.9cbs.com/read-65578.html

New Post(0)