-
-
- DOS operating system
-
- DOS is the abbreviation of "Disk Operating System" in English, which means "disk operating system" in Chinese.
- DOS is a single-user, single-task operating system.
- An operating system launched by Microsoft.
-
-
-
- Enter the DOS command interface
-
Win + R key to start running
Enter cmd (Commond command) and press Enter to enter the DOS interface
-
-
- DOS command
-
- It is a command of the DOS operating system and a disk-oriented operation command.
- It mainly includes directory operation commands, disk operation commands, file operation commands and other commands
- not case sensitive.
-
-
-
- Common DOS Commands
-
- DIR(Directory): Display directory
-
- CD (Change Directory): change or display the current directory
-
- CLS (clear screen): clear the screen
-
- Switch drive letter: Quickly change drive letter, for example: d: is to switch to D drive
- Tab : auto-completion key
- ↑ ↓ : View historical statements
-
- MD (Make Directory): create subdirectories
- RD(Remove Directory): remove subdirectory
- Copy copy file
- Del (delete) delete file
-
-
-
- Detailed command
-
- Dos is called a directory (subdirectory), and window is called a folder (subfolder)
- Familiar with operating under the window
-
- View subfolders and files under a folder dir---directory file /p /w
- Create a new folder md make directory
- Remove a folder rd remove directory (directory must be empty)
- Change the current folder cd change directory cd.. (Tab key usage)
-
-
-
- Clear screen command cls clear screen
- Helps autocomplete filenames or folders
-
- Tab键
-
- View command history
-
- up and down arrow keys
-
-
-
- file copy
-
- Copy source file destination file
- copy d:\log.txt d:\myjava\log.txt
- copy \log.txt log2.txt
-
- file deletion
-
- Del log.txt
- Del *.* delete all files in the current directory (need to confirm whether to delete)
-
-
-
- Common directory operation commands - DIR (display directory)
-
- Type: Internal command
Function: List all or specified file directories on the disk. The displayed content includes volume label, file name, file size, file creation date and time, directory name, remaining disk space, etc.Format: DIR [drive][path][filename][/P][/W][/A:property][/S]
- Type: Internal command
-
- /P: Pause the display when the displayed information exceeds one screen, and continue to display until any key is pressed.
- /W: Display file names and directory names in a horizontal arrangement, 5 per line (do not display file size, creation date and time)
- /A (attributes): Only show files with specified attributes. Without this parameter, DIR shows all files except system and hidden files.
- /S: List all contents in the specified directory and its subdirectories (but not system files and hidden files)
- Example: Display all files ending in WMA on the D drive.
-
D:> DIR * .EXE / S / P
-
-
- Common directory operation commands - CD (change or display the current directory)
-
-
-
- Type: Internal Command Format: CD [drive letter][path]
- CD.. Return to the previous directory
- CD\ returns to the root directory
-
-
-
- Common directory operation commands - MD (create subdirectories)
-
-
-
- Type: Internal Command
- Format: MD [drive letter][path]<subdirectory name>
- The drive letter and path in the command respectively indicate which drive and which directory the new subdirectory should be built on.
- The last subdirectory name in the command is the name of the new subdirectory to be created and cannot be defaulted.
- The same subdirectory cannot be created in a certain directory, and subdirectories with the same name can be created in different directories.
- Example: Create directory B under D drive, C under B, and D under C.
-
D:>MD \B\C\D
-
-
- Common directory operation command - RD (delete subdirectory)
-
-
-
- Type: Internal Command Format: RD [drive letter][path]<subdirectory name>[/S][/Q]
- The drive letter and path in the command respectively indicate which drive and which directory the subdirectory to be deleted is located in.
- The last subdirectory name in the command is the subdirectory name to be deleted and cannot be defaulted.
- /S: In addition to the directory itself, will delete all subdirectories and files under the specified directory. Used to delete directory trees.
- /Q: Quiet mode, do not confirm when deleting a directory with /S.
- Example: delete all directories and files under directory A in drive D.
-
D:>RD A /S
-
-
- Common file operation commands
-
-
-
- COPY: file copy command
- DEL(Delete): delete file command
-
-
-
- Common file operation commands - COPY (file copy)
-
-
-
- Type: Internal Command Format: COPY <source file> [object file]
- 1. The source file specifies where the file you want to copy comes from - [drive letter 1:] [path 1] [file name 1]
- 2. The target file specifies where to copy the file - [drive letter 2:] [path 2] [file name 2]
- 3. If the default drive letter is the current drive letter; if the path is the current directory, the default path can be used.
- 4. The source file name cannot be defaulted, and the default target file name means that the file name will not be changed after copying.
- Example: Copy the A.TXT file from the D drive to the C drive and change its name to B.TXT
-
D:>COPY A.TXT C:\B.TXT
-
-
- Common file operation commands - DEL (delete file)
-
-
-
- Type: Internal Command Format: DEL <filename>
- The file name in this command can use wildcards to delete a batch of files at a time (but use it with caution to avoid misoperation)
- Example: delete all files in the A directory of D drive
-
D:>del \A
D:>del \A *.*
-
-
- Once a file has been deleted from disk using del , it cannot be recovered.
-
Other DOS commands
-
- DOS command shortcuts
-
- (Drive letter:) : Quick change drive d:
- Tab : auto-completion
- ↑Arrow: Find query records up
- ↓Arrow: Find query records down
- exit : exit
-
- network operation command
-
- PING : test connection
- IPCONFIG : Check network status
- NETSTAT : show connection statistics
- TRACERT : track network connections
- PATHPING : route check command
- NSLOOKUP : dns check command
- NET : network management commands
- Ver: Displays the version number of Windows