Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Java
ping -arp google.com
works as
Java
ping -a google.com


My question is what is the meaning of -arp since it is not in the command prompt documentation?

What I have tried:

ping -a google.com

Am confused in both commands because l want to know which one is better.
Posted
Updated 10-Aug-17 0:50am
Comments
[no name] 10-Aug-17 6:40am    
try ping -amIasleep google.com. Then think a bit.

The ping command is a pretty thick one, they didn't put a lot of work into its parameter parsing.
If you look at the command line argument list: Ping Command (Examples, Options, Switches, and More)[^] you will notice they are all single character switches: "-x" where "x" is a single character.
Anything to the right of that character is ignored, so your "rp" is just junk, ignore it.
Try it, this works like -a as well:
ping -a?"Hello world" google.com
 
Share this answer
 
There is no meaning because the Windows ping command just ignores any additional characters when the first is a known option.

You can check this with options requiring an additional parameter:
ping -n 2 dest
ping -n1 2 dest
Both will perform the same action (send two requests) and
ping -n1 dest
prints an error message.

This differs from typical Unix command line utilities where multiple options can be concatenated and option parameters can be passed together with the command.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900