windows經常使用cmd指令

打開命令行

1.在菜單欄中搜索命令行
2.在文件管理器的Path欄輸入cmd,則在當前目錄打開命令行
3.Windows+R,輸入cmd,回車網絡

ping(網絡診斷工具)

ping是Windows、Unix和Linux系統下的一個命令
ping也屬於一個通訊協議,是TCP/IP協議的一部分
利用「ping」命令能夠檢查網絡是否連通,能夠很好地幫助咱們分析和斷定網絡故障,用來做爲可用性的檢查
應用格式:ping空格IP地址 或者 ping空格域名less

舉例

C:\Users\xxx>ping baidu.com

Pinging baidu.com [123.125.115.110] with 32 bytes of data:
Request timed out.
Reply from 123.125.115.110: bytes=32 time=52ms TTL=49
Reply from 123.125.115.110: bytes=32 time=51ms TTL=49
Reply from 123.125.115.110: bytes=32 time=52ms TTL=49

Ping statistics for 123.125.115.110:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 51ms, Maximum = 52ms, Average = 51ms

C:\Users\xxx>ping 123.125.115.110

Pinging 123.125.115.110 with 32 bytes of data:
Reply from 123.125.115.110: bytes=32 time=51ms TTL=49
Reply from 123.125.115.110: bytes=32 time=51ms TTL=49
Request timed out.
Reply from 123.125.115.110: bytes=32 time=51ms TTL=49

Ping statistics for 123.125.115.110:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 51ms, Maximum = 51ms, Average = 51ms

原理:利用網絡上機器IP地址的惟一性,給目標IP地址發送一個數據包,再要求對方返回一個一樣大小的數據包來肯定兩臺網絡機器是否鏈接相通,時延是多少ide

ipconfig(查看本機ip)

舉例

C:\Users\Administrator>ipconfig

Windows IP Configuration


Ethernet adapter 以太網:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter vEthernet (默認交換機):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : xxxx::xxxx:xxxx:xxxx:xxxx
   IPv4 Address. . . . . . . . . . . : x.x.x.x
   Subnet Mask . . . . . . . . . . . : x.x.x.x
   Default Gateway . . . . . . . . . :

Wireless LAN adapter 本地鏈接* 1:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter 本地鏈接* 11:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter WLAN:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : xxxx::xxxx:xxxx:xxxx:xxxx
   IPv4 Address. . . . . . . . . . . : x.x.x.x
   Subnet Mask . . . . . . . . . . . : x.x.x.x
   Default Gateway . . . . . . . . . : x.x.x.x

Ethernet adapter 藍牙網絡鏈接:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

目錄瀏覽

進入某個盤工具

D:
目標盤:

在當前盤中前進.net

cd 目標目錄

回退到上一級命令行

cd..

舉例

C:\Users\Administrator>D:

D:\>cd WeChat

D:\WeChat>cd
D:\WeChat

D:\WeChat>cd..

D:\>

查看目錄文件

dir

若是是須要查看隱藏文件的或者更多操做的話,能夠使用dir /?來查看其它用法code

D:\WeChat>dir /?
Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
  [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

  [drive:][path][filename]
              Specifies drive, directory, and/or files to list.

  /A          Displays files with specified attributes.
  attributes   D  Directories                R  Read-only files
               H  Hidden files               A  Files ready for archiving
               S  System files               I  Not content indexed files
               L  Reparse Points             -  Prefix meaning not
  /B          Uses bare format (no heading information or summary).
  /C          Display the thousand separator in file sizes.  This is the
              default.  Use /-C to disable display of separator.
  /D          Same as wide but files are list sorted by column.
  /L          Uses lowercase.
  /N          New long list format where filenames are on the far right.
  /O          List by files in sorted order.
  sortorder    N  By name (alphabetic)       S  By size (smallest first)
               E  By extension (alphabetic)  D  By date/time (oldest first)
               G  Group directories first    -  Prefix to reverse order
  /P          Pauses after each screenful of information.
  /Q          Display the owner of the file.
  /R          Display alternate data streams of the file.
  /S          Displays files in specified directory and all subdirectories.
  /T          Controls which time field displayed or used for sorting
Press any key to continue . . .

清除屏幕

cls

查看cmd下的命令

help

找到命令以後,使用 命令+ /?來查看該命令下的其餘屬性orm

cd /?

參考資料

http://www.javashuo.com/article/p-qbpelrpg-cd.htmlblog

相關文章
相關標籤/搜索