Windows Common DOS commands

Source: Internet
Author: User
Tags net time

1. View network connections and routing status

Netstat-a See which ports are open, common Netstat-an
Netstat-n View Port network connectivity, common Netstat-an
Netstat-v viewing work in progress
NETSTAT-P protocol name to view the usage of a protocol (see TCP/IP protocol Usage) Example: Netstat-p TCQ/IP
Netstat-s View all protocol usage in use

Nbtstat-a IP View the name of the user who recently logged in (136 to 139 of one port to open)
Finger username @host See which users have logged in recently

ipconfig               & nbsp     View local IP address, parameter "/all" displays all configuration information
ping IP ( or domain name)         Send the default size of 32 bytes of data to the other host, parameters: "-l[space" packet size ";"-N Send data Number ";"-T "refers to always ping.
ping-t-l 65550 IP   death Ping ( Send a file that is larger than 64K and ping it all the time.
tracert-Parameter IP         Trace Route (packet), Parameter: "-W number" for setting the time-out interval.
route print               show IP routing, will mainly display network address addres, subnet mask

Mem View CPU Usage
TLIST-T Displays the process as a tree list (additional tools for the system, which are not installed by default, within the Support/tools folder of the installation directory)
KILL-F process name plus-F parameter force end a process (additional tools for the system, default is not installed, in the Support/tools folder of the installation directory)

2. Establishing a network connection (disk mapping) and resource sharing

net use \\ip\ipc$ "/user:"         &NB Sp           establish IPC NULL link
net use \\ip\ipc$ "password"/user: "username"       establish IPC non-null link
net use H: \\ip\c$ "password"/user: "username"     Direct login after mapping each other C: to Local H:
net use H: \\ip\c$                       &NBSP ; Map after login C: to Local H:
net use \\ip\ipc$/del                   Delete IPC link
net use H:/del                        /      Delete mappings to local for H:

NET user to see which users are
NET user account name to view the properties of the account
NET user username password/add set up users
NET user Guest 12345 with guest user login and change password to 12345
NET user Guest/active:yes activates the guest user
net localgroup Administrators user name/add Add "user" to the administrator to have administrator privileges, note: After the administrator plus s with plural

NET password Password change system login password

NET time \ \ Destination IP to view the offset
NET time \ \ target Ip/set to set the local computer time to synchronize with the "Destination IP" host, plus the parameter/yes to cancel the confirmation message

NET view to see which shares are open within the local area network
NET view \\ip see which shares are turned on in the other LAN

NET share viewing locally-enabled shares
NET share ipc$ turn on ipc$ sharing
NET share ipc$/del Delete ipc$ share
NET share C $/del removal of C. shared

telnet IP               & nbsp   Port remote and login server, default port is 23 
Open IP                     Connect to IP (tel NET login command)  
Telnet                       on-machine typing telnet directly into Telnet

for this machine

The FTP IP port is used for uploading files to the server or for file operations, and the default port is 21. Bin refers to binary mode (executable file); The default is ASCII format (when text files are sent)
Tftp-i the other IP put C:\srv.exe login, upload the local c:\server.exe to the host
Tftp-i own IP get srv.exe c:\srv.exe after landing, the "IP" Srv.exe downloaded to the target host C:\srv.exe
Parameters:-I is transmitted in binary mode, such as when the EXE file is transferred, if not plus-I is transmitted in ASCII mode (transfer text file mode)

3. File operation

copy path \ file name 1 path \ filename 2/y copy file 1 to the specified directory is file 2, with parameter/y to indicate confirmation
Copy C:\srv.exe \\ip\admin$ copying the local c:\srv.exe to the other side of the admin
cppy 1.jpg/b+2.txt/a 3.jpg to hide 2.txt content into 1.jpg to generate 3.jpg new file, Note: 2.txt file header to empty three rows, parameters:/b refers to binary files,/a refers to ASCLL Format File
copy \\ip\admin$\srv.exe c \ Copy the Srv.exe file (all files) under the admini$ share to local C: (or: Copy\\ip\admin$\*.*)
xcopy to copy files or directory tree destination address \ directory name copy file and directory tree, with parameter/y will not prompt overwrite same file

del/s/Q directory or by: rmdir/s/q directory/S       Delete directories and directories All subdirectories and files. Use the parameter/q at the same time to cancel the system confirmation when the delete operation is deleted directly.
del-f file name         Add-f parameter to delete read-only files
    /ar,/ah,/as,/AA respectively Delete read-only, hidden, system, archive file
   /a-r,/a-h,/a-s,/a-a delete files except read-only, hidden, system, archive.
  for example "del/ar * *" means deleting the current directory Under all read-only files, "Del/a-s * *" means deleting all files except system files in the current directory

MD directory name           Create directory  
Replace the directory where the source file is replacing the file  
ren original filename new file name         rename file name  
Tree       &N Bsp             to display the table of contents in a tree structure, with parameter-F to list the file name   in the first folder;
Type filename         display text The contents of this document are  
more file names         display output files on a per-screen basis

dir                 and nbsp     View files, Parameters:/q Display files and directories belonging to the system which user,/t:c displays the file creation time,/t:a shows the last time the file was accessed,/t:w last modified time
move the drive letter to move \ path \ filename moved after path \ filename             Move file, with reference Several/y will cancel the prompt to confirm that the mobile directory exists with the same file, overwriting
FC 1.txt 2.txt>3. TXT           compare two files and output the differences to 3.txt files, ">" and "> >" are redirect commands
echo hello>d:\1.txt;     Write text to the specified file (replace if the file exists)
findstr "Hello" 1.txt         Find string in 1.txt file Hello
find file name                       Find a file p>

Windows Common DOS commands

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.