通常,当ping服务器IP地址时,我们有这样的回报:
Pinging <IP address> with 32 bytes of data: Reply from <ip> : bytes=32 time=151 TTL=121 Reply from <ip> : bytes=32 time=151 TTL=121 Reply from <ip> : bytes=32 time=151 TTL=121 Reply from <ip> : bytes=32 time=151 TTL=121 Ping statistics for <IP address>: packets: sent = 4,Received = 4,lost = 0 (0% loss),Approximate round trip times in milli-secounds: Minimum = 151ms,Maximum = 151 ms,Average = 151 ms
在Windows上的cmd.exe(使用Windows语言)中的简单命令,我怎么只得到以下行(只有一个ping测试的回复行)?
Reply from <IP address> : bytes=32 time=151 TTL=121
这可能更普遍地工作.
ping -n 1 <hostname/IP> | FIND "TTL="