From owner-freebsd-bugs Mon May 27 0:30: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AE5AD37B401 for ; Mon, 27 May 2002 00:30:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4R7U3u46940; Mon, 27 May 2002 00:30:03 -0700 (PDT) (envelope-from gnats) Date: Mon, 27 May 2002 00:30:03 -0700 (PDT) Message-Id: <200205270730.g4R7U3u46940@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: David Taylor Subject: Re: bin/38573: ping -o option (exit after one reply) Reply-To: David Taylor Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/38573; it has been noted by GNATS. From: David Taylor To: Dima Dorfman Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: bin/38573: ping -o option (exit after one reply) Date: Mon, 27 May 2002 08:19:57 +0100 On Sun, 26 May 2002, Dima Dorfman wrote: > David Taylor wrote: > > ping -o will exit after receiving a single reply packet, which is useful > > for trying to see if a host/link is alive at all (which is what the script > > was attempting to to do :). > > Isn't this the same as `ping -c 1`? No, ping -c 1 will exit after *sending* one packet, whether it is received or not. ping -o -c 10 will send (up to) 10 packets, exiting sucessfully after receiving the first reply, or exit(2)'ing if it fails to receive a reply from any packet. -- David Taylor davidt@yadt.co.uk "The future just ain't what it used to be" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message