DOS command set
(1) MD - build 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; Press Any Key to Continue
/ W Use: Plus / W Only the file name is displayed, so that the file size and the date and time of the establishment are 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
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
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.
Note: Unformat is fully recovered for the FORMAT disk, but if Format has been written in other data, UNFORMAT will not complete the data. Unformat is not universal, because using unformat reconstructs the FAT and root directory, it also has high hazards, and improper operation may expand loss. If you only delete several files or subdirectories, you only need to use undelete enough. 3) CHKDSK - Check Disk Current Status Commands
1. Function: Display disk status, memory status, and discontinuous number of specified files under specified paths.
2. Type: External Command
3. Format: Chkdsk [Disk] [Path] [File Name] [/ f] [/ V]
4. Instructions for use:
(1) Select the [File Name] parameter, the case where the file is displayed;
(2) Select the [/ F] parameters to correct the logic errors found on the specified disk;
(3) Select the [/ V] parameter, display all the files and paths on the disk.
(4) DiskCopy - intending to copy command
1. Function: Copy format and floppy disk that is exactly the same.
2. Type: External Command
3. Format: DiskCopy [Disk 1:] [Disk 2:]
4. Instructions for use:
(1) If the target floppy disk is not formatted, the system is automatically selected when copying.
(2) If the original file on the target floppy is copied, it will be lost.
(3) If it is a single drive copy, the system will prompt time-replacement source disk and target disk, pay attention to the source disk and target disk when operating.
(5) Label - build disk volume label command
1. Function: Establish, change, delete disk scroll.
2. Type: External Command
3. Format: Label [Disk] [Volume Label]
4. Instructions for use:
(1) The volume is named as the volume labeled name to be established. If this parameter is deficient, the system prompts to type the volume name or ask if the original volume labeled name is deleted;
(2) The volume is constructed from 1 to 11 characters.
(6) VOL - Display Disk Booster Commands
1. Function: View the disk volume mark.
2. Type: internal command
3. Format: Vol [Disk]
4. Instructions for use: omitted the disc character, display the current drive scroll.
(7) ScanDisk - detection, repair disk command
1. Function: Detecting a disk's FAT table, directory structure, file system, etc. have problems, and can fix the detected issues.
2. Type: External Command
3. Format: Scandisk [Disk 1:] {[Disk 2:] ...} [/ all]
4. Instructions for use:
(1) CCANDisk is suitable for hard disk and floppy disk, you can specify multiple disks at a time or to specify all disks for [/ all] parameters;
(2) The logical errors such as cross-linking, loss clusters, and directory structures that occur during the disk can be automatically detected, and fix them.
(8) DEFRAG - Reforming Disk Command 1. . Function: Monitor disk and eliminate disk scaffold.
2. Type: External Command
3. Format: DEFRAG [Drive:] [/ f]
4. Instructions: Select / F parameters to eliminate fragmentation on the file, and adjust the arrangement of disk files to ensure that there is no gap between files. To speed up the speed of the disk and save disk space.
(9) SYS - System Replication Command
1. Function: Transfer the DOS system files IO.SYS, MSDOS.SYS, and Command.com on the current drive to the specified drive.
2. Type: External Command
3. Format: SYS [Disk]
* Instructions: If the disk remaining space is not enough to store system files, then prompt: no roomfor on destination disk.
File operation class command
(1) Copy file copy command
1. Function: Copy one or more files to the specified disk.
2. Type: internal command
3. Format: COPY [Source Disk] [Path]
4. Instructions for use:
(1) COPY is the file copy data on the file, and the target disk must have been formatted before replication;
(2) During the copy process, the old file on the same file name on the target disk will be replaced by the source file;
(3) When copying the file, you must first determine enough space, otherwise it will appear; InsufFicient's error message, prompting disk space insufficient;
(4) The file name is allowed to use the generalization "*" "?", And multiple files can be copied at the same time;
(5) The source file name in the copy command must be pointed out that it is not omitted.
(6) When copying, the target file name can be the same as the source file name, called "the same name copy", and the target file name may be omitted;
(7) When copying, the target file name can also be different from the source name, referred to as "a copy copy", at this time, the target file name cannot be omitted;
(8) When copying, you can also merge several files into a file, called "merge copy", the format is as follows: Copy; [source disk] [Path]
(9) Using the COPY command, you can also enter the data to establish files from the keyboard, the format is as follows: Copy Con [Disk:] [Path]
(10) Note: The usage format of the copy command, the source file name and the target file name must have space!
(2) XCOPY - Directory copy command
1. Function: Copy all files in the specified directory and directory together with the directory structure.
2. Type: External Command
3. Format: xcopy [source disk:]
4. Instructions for use:
(1) Xcopy is the extension of COPY, can copy the specified directory and directory structure, but cannot copy the hidden file and system file; (2) use the time source disk, source target path name, source file name Specify one;
(3) Use / s to copy all the files under the source directory and its subdirectory. Unless specified / e parameters, / s does not copy the empty directory, if the / s parameter is not specified, the XCopy only copies the source directory itself, and does not involve the subdirectory under which;
(4) When the / v parameter is selected, the sector of the pair is checked, but the speed will be reduced.
(3) TYPE - display file content command
1. Function: Displays the contents of the ASCII code file.
2. Type: Internal Command.
3. Format: Type [Disk] [Path]
4. Instructions for use:
(1) Display text files consisting of ASCII code, right. EXE.COM, etc., the content of its display is unread, there is no practical meaning 2;
(2) This command can only display the content of a file at a time, and the wildcard cannot be used;
(3) If the file has an extension, the extension must be written;
(4) When the file is longer, when the screen is displayed, it can be displayed in the following format; Type [Display:] [Path]
(5) If you need to print the contents, you can use the following format:
TYPE [Drive:] [Path]
At this point, the printer should be in a online state.
(4) REN - file rename command
1. Function: Change the file name
2. Type: internal command
3. Format: REN [Disk] [Path]
4. Instructions for use:
(1) You cannot add the disk and path before the new file name, because the command can only replace the file name on the file on the same plate;
(2) Allows a set of file names or extensions using wildcard.
(5) FC - file comparison command
1. Function: Compare the difference in the file, and lists the differences.
2. Type: External Command
3. Format: FC [Drive:] [Path Name]
4. Instructions for use:
(1) Select / a parameter to compare the ASCII code;
(2) Select / b parameter to compare the binary comparison mode;
(3) Select / c parameters to see the case as the same character.
(4) Select / n parameters, in the ASCII code comparison mode, display the line number of the difference.
(6) Attrib - Modify the file attribute command
1. Function: Modify the properties of the specified file. (For the file attribute, see 2.5.4 (2) File Properties section) 2. Type: External Command.
3. Format: attrib [file name] [R] [- r] [A] [- a] [h] [- h] [s] [- s] [/ s]
4. Instructions for use:
(1) Select the R parameter, set the specified file to read-only properties, so that this file can only be read, cannot write data or delete; select -R parameters, remove read-only properties;
(2) Select a parameter to set the file to file properties; select -A parameters to remove file properties;
(3) Select the H parameters, adjust the file to impide the implied attribute; choose -h parameters to hidden attributes;
(4) Select the S parameters to set the file as the system properties; select -S parameters to remove system properties;
(5) Select / s parameters to set all the subdirectories and settings to the current directory.
7) DEL - delete file commands
1. Function: Delete the specified file.
2. Type: internal command
3. Format: DEL [Disk] [Path]
4. Instructions for use:
(1) Select / P parameters, the system is inquiry before deleting whether the file is really deleted, if this parameter is not used, then automatically delete;
(2) This command cannot delete the attribute as an implicit or read-only file;
(3) The wildcard can be used in the file name;
(4) To delete all files (Del * · * or DEL ·) on the disk, will you prompt: (Are you determined?) If you answer Y, then delete, answer n, then cancel This delete job.
(8) Undelete - Restore Delete Commands
1. Function: Restore missed command
2. Type: External Command.
3. Format: Undelete [Disk] [Path Name]
4. Instructions: Use Undelete to use "*" and "?" Wildcard.
(1) Select the / dos parameter to recover the files according to the records remaining in the directory. Since the file is deleted, the first character recorded by the directory will be changed to E5. DOS finds the file you want to recover according to the E5 and its subsequent characters starting, so Undelete will require the user to enter a character. To make up the file name. But this character does not have to be the same as the original, just in line with the DOS file name rules.
(2) Selecting / List only "List" Files that meet the specified criteria without performing recovery, so there will be no impact on disk content.
(3) Select / ALL to automatically recover fully recoverable files, and inform the user in order to use this parameter, if Undelte uses the recorded records in the directory to recover files, it will automatically select a character. Names, and make it the same as the existing file name, the preferred order of the selection is: #% - 0000123456789a ~ z. Undelete also has the function of establishing the protection measures of the document, which has exceeded the scope of the course, and readers should check the DOS manual when using some functions.
Seven, other orders
(1) CLS - clear screen command
1 Function: Clear all the display on the screen, the cursor is placed on the upper left corner of the screen.
2 Type: Internal Command
3 format: CLS
(2) VER View System Version Number Command
1 Function: Display the current system version number
2 Type: Internal Command
3 format: Ver
(3) DATA date setting command
1 Function: Set or display the system date.
2 Type: Internal Command
3 Format: Date [mm - DD - YY]
4 Instructions for use:
(1) omission [mm - dd - y] Display the system date and prompts to enter a new date, do not modify, you can press the Enter key directly, [mm - dd - y] "month-day-day - year "format;
(2) When the machine starts start, there is an automatic processing file (Autoexec.bat) is executed, the system does not prompt the system date. Otherwise, prompt to enter the new date and time.
(4) TIME system clock setting command
1 Function: Set or display the system period.
2 Type: Internal Command
3 Format: Time [hh: mm: ss: xx]
4 Instructions for use:
(1) omissions [HH: MM: SS: XX], display the system time and prompt to enter a new time, you can press the Enter key directly, [hh: mm: ss: xx] "Hours: Minute: Second : A few seconds "format;
(2) When the machine starts start, there is an automatic processing file (Autoexec.bat) is executed, the system does not prompt the system date. Otherwise, prompt to enter the new date and time.
(5) MEM View the current memory status command
1 Function: Show the current memory usage
2 Type: External Command
3 format: MEM [/ C] [/ f] [/ m] [/ P]
4 Instructions for use:
(1) The selection / c parameter lists the length of each file loaded into regular memory and CMB, and also shows the usage status of memory space and the maximum available space;
(2) Select / F parameters list the current regular memory remaining bytes and the area and size of UMB available;
(3) Select / M parameter Display the module uses memory address, size and module nature;
(4) Select / P parameter Specify that when the output exceeds a screen, the user is paused for users to view.
(6) MSD display system information command
1 Features: Display the situation of the hardware and operating system of the system.
2 Type: External Command
3 format: MSD [/ i] [/ b] [/ s]
4 Instructions for use:
(1) When selecting / i parameter, the hardware is not detected; (2) Start the MSD in black and white when selecting / b parameter;
(3) When selecting / s parameters, a concise system report is displayed.