1. Directory operation commands
1. Introduction: The operation commands mentioned next are also called “DOS commands”;
It is used in DOS systems, and DOS systems are compatible with Windows systems.
2.DOS system operation:
win + R —-> Open the run window —-> Enter cmd —–> Press Enter and it will open
The prompt information for opening the window represents the path (location information) currently entered by the DOS system; the folder <-----> directory
3.cd Switch directory/folder (change path)
Format: cd directory name
Supplement: Switch disk operation: Disk letter name:
Example: Switch to D drive: D: d: Switch to F drive: F: f:
The outermost directory of each local disk (just entered a local disk) is called the “root directory”
Example:
Example: Switch to the D drive, which can also be said to be the root directory of the D drive -> the outermost directory of the D drive.
cd … Return to the previous directory (exit the current folder)
cd \ Return directly to the root directory
Note: When switching directories, you can also write the full path of the directory clearly, then you can directly switch to the specified directory after the cd reads it; however, cd cannot switch across disks (default), if you want to < strong>Switch across disks: cd /d full path
dir /s not only checks the contents of the current directory, but also checks the contents of subdirectories
dir /a View all files, including hidden files
dir /ah View only hidden files
Extension: dir c: View the contents of the c drive
5.md Create a new directory/folder
Format: md directory name
Create a nested directory: md directory name 1\directory name 2\directory name 3…
Create multiple directories (of the same level) at one time: md directory name 1 directory name 2 directory name 3…
6.rd Delete empty directory
Format: rd directory name
Delete multiple empty directories at once: rd directory name 1 directory name 2 directory name 3…
Delete a non-empty directory: There is a prompt: rd /s directory name Forced deletion: rd /s /q directory name
7.del Delete files
Format: del file name
Note: If the deleted file or directory is not in the current path, you need to write the path clearly.
Tips: When learning command knowledge: 1>The role of commands: What do commands do;
? 2>The syntax format of the command;
? 3> If there are parameters, then combine the parameters to understand its function;
8.tree displays the contents of the directory in a tree structure (only the directory is displayed by default)
tree /f show directories + files
tree /a Change graphic display mode
2. File operation commands
1.attrib Modify file attributes
Common attributes: r read-only h hide a file/document s system -> no more hiding is allowed
Modification operations: + Add – Remove
Format: attrib + attribute – attribute file name
2.copy Copy files
Format: copy source file path information target file path information
3.move Move files—-> Cut (directory)
Format: move source file path information target file path information
4.ren/rename Rename files
Format: ren old file name new file name
5.type displays the content of the text
Format: type file name
3. Functional operation commands
cls clear screen
date date
time time
exit exit (close the command line window)
pause pause input operation
ver View version number
shutdown shutdown
4. Network operation commands
1.ipconfig View network configuration information, such as ip address
Windows IP Configuration Ethernet adapter Ethernet: Connection specific DNS suffix . . . . . . . : Link-local IPv6 address. . . . . . . . : fe80::b05a:4922:fc57:9138 IPv4 address . . . . . . . . . . . . . : 10.9.68.221 Subnet mask . . . . . . . . . . . . . : 255.255.255.0 Default gateway . . . . . . . . . . . . . . : 10.9.68.1
IPv4 address . . . . . . . . . . . . . : 10.9.68.221 ip address
2.ipconfig/all View all/detailed network configuration information
Ethernet Adapter Ethernet: Connection specific DNS suffix . . . . . . . : Description. . . . . . . . . . . . . . . . : ASIX AX88179 USB 3.0 to Gigabit Ethernet Adapter Physical address. . . . . . . . . . . . . . : F8-E4-3B-78-68-31 DHCP enabled . . . . . . . . . . . . : Yes Auto-configuration is enabled. . . . . . . . . . . : Yes Link-local IPv6 address. . . . . . . . : fe80::b05a:4922:fc57:9138 (preferred) IPv4 address . . . . . . . . . . . . . : 10.9.68.221 (preferred) Subnet mask . . . . . . . . . . . . . : 255.255.255.0 Time to obtain lease . . . . . . . . . : November 11, 2023 8:49:56 Lease expiration time . . . . . . . . . : November 12, 2023 8:49:55 Default gateway . . . . . . . . . . . . . . : 10.9.68.1 DHCP Server . . . . . . . . . . . . : 10.9.68.1 DHCPv6 IAID . . . . . . . . . . . : 603513915 DHCPv6 Client DUID . . . . . . . : 00-01-00-01-29-FA-9C-09-04-ED-33-FF-6E-19 DNS server . . . . . . . . . . . . : 202.106.196.115 219.141.140.10 NetBIOS over TCPIP . . . . . . . : Enabled
3.ping detects network connectivity (checks whether communication between host and host is possible)
ping domain name (name of website) —–> ping www.baidu.com
ping IP address —-> ping 10.9.68.227
If you can ping successfully and get a response, it means the network is OK; if you don’t get a response after pinging, it means the network is limited/has a problem.
Example:
D:>ping www.baidu.com Pinging www.a.shifen.com [110.242.68.3] with 32 bytes of data: Reply from 110.242.68.3: Bytes=32 Time=13ms TTL=53 Reply from 110.242.68.3: Bytes=32 Time=11ms TTL=53 Reply from 110.242.68.3: Bytes=32 Time=10ms TTL=53 Reply from 110.242.68.3: Bytes=32 Time=10ms TTL=53 Ping statistics for 110.242.68.3: Packets: Sent = 4, Received = 4, Lost = 0 (0% lost), Estimated round trip time in milliseconds: Shortest = 10ms, Longest = 13ms, Average = 11ms
4.netstat View network usage (local host) and monitor network information and data
Extension: Port number: represents an application, and each application will have its own port number. The name of the software is for the convenience of users to identify the software. The port number of the software is for the computer system or network to identify the software.
Summary: ①The function of the command ②The grammatical structure of the command ③The cooperative function of the command and parameters