I just figured out, that ping
on a Linux platform (Ubuntu 13.10) does not timeout as described. I tried
ping -w 2 unreachable.com
and
ping -W 2 unreachable.com
but in neither case there was a timeout after 2 seconds. How can I use ping
with a definite timeout? Is that possible at all? I want the command to stop after 2 seconds, regardless of any connection status.