A concerned reader writes:
I haven’t yet read through your book Learning Unix for Mac OS X Panther, but I realize now that I probably need to! Here’s what happened: I typed this command “ping www.yahoo.com -f -1 1492” into terminal from a website saying it might help me determine my ideal MTU settings. I believe they mislabeled the instructions and this command should have been for Windows… not Mac.
Did I screw anything up? Here’s what I typed and the results I received:
Last login: Sun Oct 17 22:06:55 on console Welcome to Darwin! Wiamea:~ mike$ ping www.yahoo.com -f -1 1492 usage: ping [-Rdfnqrv] [-c count] [-i wait] [-l preload] [-p pattern] [-s packetsize] host Wiamea:~ mike$
Take a deep breath. Exhale.
You are safe in experimenting with the Terminal as long as you avoid a few powerful commands (which is no different from experimenting within the Finder as long as you avoid “Move File to Trash” and similar). I’d suggest that you start by learning how the following commands work together:
pwd | to get your present working directory |
cd | to move to your home directory |
cd DIRNAME | to move to DIRNAME (whatever you want. Try ‘..’ to get started) |
ls | to list files and directories |
ls -F | same as ls, but shows directories with a ‘/’ |
In terms of the ping command, that’s one that varies a wee bit from different varieties of Unix. Nothing to panic about, but whenever you have a question about the usage of a command, you should use the “man” command to learn what the command really wants:
man ping
That would reveal that the version of ping included with Panther supports the -f flag, but that there’s no -1 flag available. Perhaps that was intended to be a -l flag (lower case L) instead? The man page reveals:
-l preload If preload is specified, ping sends that many packets as fast as possible before falling into its normal mode of behavior.
So that might well be what the Web site you were reading suggests.
I hope this is all helpful. You might be interested to know that I’m busy revising Learning Unix for Mac OS X for Tiger when it’s released and as part of that will be adding more hands-on practice in the slim volume. (which isn’t to say that the current edition isn’t useful too! You can learn more about it at http://www.intuitive.com/macosx/ if you’d like)
Please, do feel free to explore the Terminal. It’s a very powerful secret advantage that us Mac people have over the users of The Other Operating System. 🙂
I’ve been battling the same thing, and using the correct l (lowercase L) does not result in a good command (even though the man page suggests that these are supported options.
Here’s what I’m getting:
ping yahoo.com -f -l 1472
usage: ping [-AaDdfnoQqRrv] [-c count] [-i wait] [-l preload] [-M mask | time]
[-m ttl] [-p pattern] [-S src_addr] [-s packetsize]
[-t timeout] [-z tos] host
ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload]
[-M mask | time] [-m ttl] [-p pattern] [-S src_addr]
[-s packetsize] [-T ttl] [-t timeout] [-z tos] mcast-group