Ⅰ 批處理的ping 命令怎麼用
因為PING一個包大概要1秒呀,所以就用來作延時了,雖然這個方法笨死了。
ping www.163.com 這樣,就是拼網易的主頁,默認會拼四個包。
ping 127.1 就是拼本機了
加 /n 就是指定拼的包的個數。如
ping /n 5 127.1
這就是拼5個包,就不是默認的四個了。這樣就大延時5秒吧。其實這要看網卡了。還有網路狀態。一點都不準。
ping /n 5 127.1 >nul 就是把拼的輸出信息屏蔽,也就是屏幕上不顯示拼的結果,反正我們要延時,不是想知道拼的結果。
ping 本來就作用是來測試網路是否通暢的。如果你拼 163,拼不通,就說明你上不了網易的網站了。
以下是參考:
C:\Users\feng>ping /?
Usage: 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] [-4] [-6] target_name
Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet (IPv4-only).
-i TTL Time To Live.
-v TOS Type Of Service (IPv4-only).
-r count Record route for count hops (IPv4-only).
-s count Timestamp for count hops (IPv4-only).
-j host-list Loose source route along host-list (IPv4-only).
-k host-list Strict source route along host-list (IPv4-only).
-w timeout Timeout in milliseconds to wait for each reply.
-R Use routing header to test reverse route also (IPv6-only).
-S srcaddr Source address to use (IPv6-only).
-4 Force using IPv4.
-6 Force using IPv6.