Ping命令和参数 [英] Ping commands and parameter

查看:120
本文介绍了Ping命令和参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ping -arp google.com

作为

ping -a google.com





我的问题是-arp是什么意思,因为它不在命令提示符文档中?



< b>我尝试过:



ping -a google.com



Am在两个命令中都很困惑,因为我想知道哪一个更好。



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.

推荐答案

ping命令非常厚,他们没有投入大量精力它的参数解析。

如果查看命令行参数列表: Ping命令(示例,选项) ,开关等) [ ^ ]您会注意到它们都是单字符开关: - x其中x是单个字符。

忽略该字符右侧的任何内容,因此您的rp为j是的垃圾,忽略它。

尝试一下,这就像-a一样:

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


没有任何意义,因为当第一个是已知选项时,Windows ping 命令会忽略任何其他字符。



您可以通过需要额外参数的选项来检查:

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

打印错误消息。



这与典型的Unix命令行实用程序不同,后者可以连接多个选项,并且选项参数可以与命令一起传递。

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.


这篇关于Ping命令和参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆