Article Directory
Common DOS command finishing
A, DOS internal command
Change directory command: cd
cd \ to return to the root directory of the current partition
cd ... go back one level
E: partition into the root directory of E
Create a directory command: md (make directory)
Function: Create a subdirectory
Note: You can create multiple sets of commands directly
md AA BB
Md XX\YY\ZZ
** delete the directory command: rd **
rd directory name to delete an empty directory, there are tips
rd / q directory name to delete an empty directory without prompting
rd / s directory name to delete the directory tree
rd / s / q test directory directory name does not remove a directory tree tips
rd /? View Help
Show Files command: dir
dir [drive: Drive Name] [path directory path] [/ p] [/ w] [/ o] [/ s] [/ a]
[/ A] show all files, the file containing the hidden
[/ P] represents the contents of the directory page display. To see the next screen, press any key.
[/ W] represents the file name of the current directory displayed in list format width
[/ O] denotes a display file sort order
[/ S] represents the display list in the current directory and its subdirectories for all files.
R read-only file directory D
H Hidden files A Files ready for archiving
S System files - "No" prefix
E.g:
dir / a: H displays only hidden files
dir / o: S classification display, sort size press
Clear the screen: cls
File copy command: copy
Format: copy [/ D] [/ V] [/ N] [/ Y | / -Y] [/ Z] [/ L] [/ A | / B] copy destination file path Path
/ A indicates an ASCII text file.
/ B represents a binary file.
/ D allows the target file to be created decrypted
/ V Verify that the new file is written correctly.
When / N copy a file with a non-8dot3 name, as far as possible the use of short file names./ Y to confirm you want to overwrite an existing destination file prompt.
/ -Y prompted to confirm you want to overwrite an existing destination file.
/ Z Copies networked files in restartable mode.
/ L If the source is a symbolic link, copy the link
to the actual file objectives rather than the source link points.copy 1.txt e: \ prompt when / y have the same name as the file 1.txt
File Delete command: del
Command to edit the file: edit
Rename the file command: ren
ren1.txt 222.txt 1.txt will rename the file to 222.txt
The file move command: move
move 1.txt e: \ 1.txt Copy the file to the e drive
Look at the file command: type
type 1.txt
Setup command file attributes: attrib
Format: attrib [+ R | -R] [+ A | -A] [+ S | -S] [+ H | -H] [+ O | -O] [+ I | -I] [+ X | - X] [+ P | -P] [+ U | -U] file address [/ S] [/ D] [/ L]
+ Set the properties.
- Clear property.
R read-only file attribute.
A archive file attributes.
S System file attribute.
H Hidden file attribute.
O offline properties.
I no content index file attributes.
X no cleanup file attributes.
V integrity of the property.
P fixed property.
U non-fixed attributes.
/ S processing the current folder and all sub-folders
matching files.
/ D also handles folders.
/ L symbolic links and symbolic link destination attributeExample:
attrib + h 1.txt 1.txt file will be set to hide files
ipconfig command Detailed
/ All display complete configuration information
/ Release to release IP addresses
/ Renew to obtain IP address
/ Flushdns to clear the DNS cache.
/ Registerdns Refreshes all DHCP leases and re-register DNS names
/ Displaydns displays the contents of the DNS resolver cache
/ Showclassid display adapter allows all class ID dhcp
/ Setclassid modify dhcp class id
Set startup options and service commands: MSConfig
Check computing port information command: netstat
Format: netstat [-a] [-b] [-e] [-f] [-n] [-o] [-p proto] [-r] [-s] [-x] [-t] [interval ]
-a displays all connections and listening ports.
-b to display the executable involved in creating each connection or when listening port. In some cases, known executables carrying a plurality of separate components, in these cases, the display component creating a sequence involved in the connection or listening port. In this case, the name of the executable program at the bottom in [], it calls the component at the top, until it reaches the TCP / IP. Note that this option may be very time consuming, and may fail when you do not have permission.
-e Displays Ethernet statistics. This option can be used with the -s option.
-f show the external address fully qualified domain name (FQDN).
-n Display addresses and port numbers in digital form.
-o displays the process ID associated with each connection to have.
-p proto proto specified connection display protocol; proto may be any of the following: TCP, UDP, TCPv6 or UDPv6. If used to display statistics for each protocol, proto may be any of the following with the -s option: IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP or UDPv6.
-q Show all connections, listening ports and non-binding listens on TCP port. Non-bound listening port is not necessarily associated with an active connection.
-r Displays the routing table.
-s to display statistics for each protocol. By default, display IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP and UDPv6 statistical information;
-p option can be used to specify the default subnet.
-t displays the current connection unloaded state.
-x display NetworkDirect connection, listeners and sharing
endpoint.
-y show all TCP connections template connection.
It may not be combined with other options.
interval to re-display the selected statistics for the number of seconds between each display pause. Press CTRL + C to stop re-display statistics. If omitted, netstat will print the current configuration information once.Example:
netstat -na
netstat -p tcp -that
Testing Network Connectivity command: ping Reference Document
格式:ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] [-R] [-S srcaddr] [-c compartment] [-p]
[-4] [-6] 地址-t Ping the specified host until stopped.
To see statistics and continue, type Ctrl + Break;
To stop, type Ctrl + C.
-a resolve addresses to host names.
Echo -n count to send requests.
-l size Send buffer size.
-f set "do not fragment" flag in the packet (only for IPv4).
-i TTL survival time.
-v TOS Type of Service (Only for IPv4. This setting has been deprecated,
without any of the IP header Type of Service field
influence).
-r count routing hop count recording (only for IPv4).
-s count timestamp hop count (only for IPv4).
Loose source routing -j host-list for use with a list of hosts (only for IPv4).
Strict Source Route -k host-list for use with a list of hosts (only for IPv4).
-w timeout waiting timeout time of each reply (in milliseconds).
-R route using the same test reverse route header (only for IPv6).
According to RFC 5095, it has been abandoned route header.
If this header, some systems may discard the
echo request.
-S source address srcaddr to use.
-c compartment cofferdam routing identifier.
-p Ping Hyper-V network virtualization provider address.
-4 forced to use IPv4.
-6 forced to use IPv6.Example:
ping -a 127.0.0.1
ping 127.0.0.1 -n 5
ping 127.0.0.1 -t
Automatic shutdown command: shutdown
-i display GUI interface, must be the first option
-l log off (can not be used with the option -m)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \ computername Remote computer to shutdown / restart / abort
-t xx xx is set off timeout seconds
-c "comment" to close the comment (maximum 127 characters)
-F Forces running applications to close without warning
-d [u] [p]: xx: yy off reason code
u is the user code
p is a planned shutdown code
xx is (a positive integer less than 256) major reason code
yy is a minor reason code (positive integer less than 65536)
Task management command
View tasklist process
[Picture dump outside the chain fails, the source station may have a security chain mechanism, it is recommended to save the pictures uploaded directly down (img-19Vin0u4-1581590534951) (C: \ Users \ l1998 \ AppData \ Roaming \ Typora \ typora-user-images \ image-20200213123921552.png)]
Common parameters:
/ S is connected to a remote system
/ U which users run this command
/ P designated by the user password
/ M list all processes call the specified DLL module
/ SVC displays each process in the service
DETAILED DESCRIPTION Information Display N
/ FI filter shows a series of processes in line with the specified
taskkill kill the process
parameter:
/s: (system)
Specify the remote computer name or IP address (do not use a backslash). The default is the local computer.
/u: (username)
UserName user account privileges or use of Domain * UserName specified to run the command. Only specified / to specify the / u when s. The default is to log on to the computer issuing the command of the current user's permissions.
/p: (password)
Password specify the / u parameter to specify the user account.
/f: (force)
Force the end of a running process.
### Note:
This parameter is ignored remote processes; all remote processes are forcibly terminated
/t: (Terminate)
Terminated by the specified process and any child processes it starts. Terminated by the specified process and any child processes it starts.
/pid: (process identify)
Process ID
/im: (image Name)
Process Name
/ Fi: (filter)
Specifies the process type in a query to include or exclude from the query.
FilterName Valid opreaters valid Values
status eq,ne running,suspended,not responding,unknown
imageName eq,ne image name
PID eq,ne,gt,ge,lt,le PID value
seesion eq,ne,gt,ge,lt,le session id
seesionName eq,ne seesion Name
cupTime eq,ne,gt,ge,lt,le HH:MM:SS
memUsage eq,ne,gt,ge,lt,le memory usage in KB
userName eq,ne Any valid user name
modules eq,ne dll Name
services eq,ne sevices Name
windowTitle eq,ne window title
valid opreaters:
eq: equal (equal)
ne: not equal (not equal)
gt: greater than (greater than)
ge: greater than equal (or greater)
lt: less than (less than)
le: less than equal (or less)
// Precautions:
-> When you specify a remote system does not support WINDOWTITLE and status filters.
-> only when applying filters before accepting an asterisk * wildcard.
-> Whether or not specify the / f option, will always enforce terminate remote process.
-> Provide computer name to the host name of the filter will result in the closure, and all processes are stopped.
-> You can use the task list to determine the process ID (PID) to terminate the process.Use telnet command
services.msc to open telnet service
Time and date of the change command
time time command
time modify the current system time
time / t displays the current system time
date date of the order
modify the current system date data
data / t displays the current system date
Tracking diagnostic data reported -tracert command
Format: the tracert [-d] [maximum_hops -H] [-j Host-List] [-w timeout]
[-R & lt] [-S srcaddr] [-4] [-6] Host AddressOptions:
-d does not resolve addresses to host names.
-h maximum number of hops maximum_hops search target.
-j host-list with the list of hosts with loose source routing (only for IPv4).
-w timeout wait for each reply timeout (in milliseconds).
-R round trip path tracking (only for IPv6).
-S srcaddr source address to be used (only applicable to IPv6).
-4 forced to use IPv4.
-6 forced to use IPv6.Disk Defragmenter -defrag command
Management of formatting commands -format command
Command -label label change command
Change system settings and management of titles and window colors -title command and color command
net user command Detailed
net localgroup command Detailed
net share command Detailed