In windows argument -w
and number in milliseconds set how long wait echo reply from pinging host.
I'm running now macOS Sierra and -t
argument from ping help set count of echo requests. So ping google.com -c 5
and ping google.com -t 5
give the same result – five echo requests with default timeout.
Is there a flag that does what I need?
Best Answer
Looking at the man page for ping (
man ping
); under the-i wait
option, we see that the default time between sending pings is 1 second:So, using the default of sending 1 packet every 1 second, the options
-t
and-c
will produce the same output.When we add in a fractional wait time of say, a half second, we should now get 12 packets sent within the 6 seconds:
Twelve responses as expected. Note, that you must run this as
root
; per the man page for the-i wait
option:Now, the
-W
option (capital "W", not lowercase) will be the equivalent to the Windows-w
which specifies a wait time between receipt of the packets: