📜  如何只用四次 ping - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:13.737000             🧑  作者: Mango

代码示例1
$ ping 0 -c 2
PING 0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.024 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.006 ms

--- 0 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.006/0.015/0.024/0.009 ms