Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Ping from the command line

Ping from the command line
Thread Tools
Junior Member
Join Date: Jan 2005
Location: Chicagoland
Status: Offline
Reply With Quote
Jan 23, 2005, 01:39 PM
 
I was using the ping command from the unix command line. How do you get it to stop?

Stephen
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Jan 23, 2005, 02:57 PM
 
Originally posted by Stephen-I-Am:
I was using the ping command from the unix command line. How do you get it to stop?
Just type Ctrl-C. That is... press the key marked CONTROL (lower left of Mac keyboard) and while holding the CONTROL key down press the C key. Ctrl-C (or Ctrl+C) is shorthand for the above. Another way it is written is ^C. Ctrl-C is the usual way to quit a running command in Unix. Another method is Ctrl-D (which is console End-Of-File or EOF). To suspend a command (which is NOT the same thing as quit) use Ctrl-Z.
-DU-...etc...
     
Mac Enthusiast
Join Date: Jan 2001
Location: Leesburg, Virginia
Status: Offline
Reply With Quote
Jan 23, 2005, 10:50 PM
 
Originally posted by Stephen-I-Am:
I was using the ping command from the unix command line. How do you get it to stop?

Stephen
Of course, if you look at the man page for ping, you'll learn that you could issue
Code:
ping -c 3 xx.xx.xx.xx
which would only send out three pings, just like the Windows command line, and then stop after receiving the response packets or timing out.

Dominik Hoffmann
     
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Jan 24, 2005, 01:40 AM
 
I guess it might be helpful to know that using Control-C to exit a program is the same as sending it an interrupt signal. To send an interrupt to a process you'd use kill like: kill -INT <process #>. You can test this by starting a process like top in one shell and then sending it an interrupt from another. Same thing as ^C!

I always thought a better name for kill would be "signal sender" but that's just me. See "kill -l" for a list of about thirty signals that you can send.

Take that as you will.
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Jan 24, 2005, 08:02 AM
 
Originally posted by DominikHoffmann:
Of course, if you look at the man page for ping, you'll learn that you could issue
Code:
ping -c 3 xx.xx.xx.xx
i have that as an alias called `pping`
     
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Jan 24, 2005, 09:06 AM
 
Originally posted by Phil Sherry:
i have that as an alias called `pping`
Hehe, why not "3ping"?
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Jan 24, 2005, 09:26 AM
 
Originally posted by [APi]TheMan:
Hehe, why not "3ping"?
mine's actually 4, not 3
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:13 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2