5

The BSD version of Ping(8), notably on OS X, includes a convenient "one ping only" option (-o) that mirrors Sean Connery's famous quote from Hunt for Red October. The option terminates Ping once the first reply is received.

I am trying to find out when the option was added or dropped from Ubuntu's Ping implementation. A note on Ars Technica's forum seems to hint that this is an older option (and perhaps has now been dropped?).

Any historical insight would be useful.

Why is this handy? Because you can do stuff like this:

ping -o 1.2.3.4; ssh ubuntu@1.2.3.4 

and it will connect you with the server as soon as it becomes available on the network.

0xF2
  • 3,155

1 Answers1

7

Today:

Use:

until ssh ubuntu@1.2.3.4 ; do sleep 0.25; done

to ssh into the server the moment it becomes available.

The past:

The earliest source code of the GNU inetutils I could find that contained ping is:

2001-06-13  Sergey Poznyakoff
    * ping.c: implemented
    * ping_address.c, ping_echo.c, ping_impl.h, ping_router.c,
      ping_timestamp.c: added to repository.

and that did not contain the -o parameter... So we can safely conclude that this option did not exist in 2001 and as Warty Warthog was released in 2004 we can prove beyond any doubt that this option never existed in Ubuntu.

;-)

Fabby
  • 35,017