首页 > 其他分享 >查看命令帮助

查看命令帮助

时间:2023-03-10 22:22:57浏览次数:35  
标签:帮助 OPTION 查看 ... -- 命令 参数 options

参考

  1. mandatory to long options are mandatory to short options too是什么意思?_百度知道 (baidu.com)

如何查看命令的帮助信息

  1. 命令 --help

帮助信息中的符号及其含义

以ls命令为例

帮助信息组成:
1. 命令使用格式
2. 命令作用
3. 参数含义

使用格式

ls [OPTION]... [FILE]...
[OPTION] :OPTION 可选 
	...  :前面的对象有任意个
 [OPTION]... :可选参数可以有任意个
 < > :必选

命令作用

List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

Mandatory arguments to long options are mandatory for short options too.

列出关于文件的信息(默认为当前目录)。
按照字母顺序排序,如果没有指定 cftuvSux 中的任何一个,也没有指定 --sort
强制的长可选项参数?对短可选参数同样是强制的?
	long options 指的是全称的参数?

可选参数

  -a, --all                  do not ignore entries starting with .
  -A, --almost-all           do not list implied . and ..

-a :参数使用
--all:参数全称的使用
do not ignore entries starting with. :不要忽略以. 开头的条目

注意到:大写字母和小写字母的含义是不同的
image

-a:列出了当前目录 .和上一级目录..;-A:忽略了.和..

多个可选参数的使用

有两种方式:

  1. 分别使用-argument,如:-a -l
  2. 简短名称连在一起 -al

注意:-a 和 --all 等效,而-all 是多个简短参数的组合!
image

标签:帮助,OPTION,查看,...,--,命令,参数,options
From: https://www.cnblogs.com/mingstudent/p/17204809.html

相关文章