相关疑难解决方法(0)

单破折号 `-` 表示单字符选项,双破折号 `--` 表示单词?

字母使用单破折号和单词使用双破折号的惯例从何而来,为什么继续使用?

例如,如果我输入ls --help,您会看到:

  -a, --all                  do not ignore entries starting with .
  -A, --almost-all           do not list implied . and ..
      --author               with -l, print the author of each file
  -b, --escape               print octal escapes for nongraphic characters
      --block-size=SIZE      use SIZE-byte blocks
  -B, --ignore-backups       do not list implied entries ending with ~
...
Run Code Online (Sandbox Code Playgroud)

我尝试使用谷歌搜索- and -- convention即使没有成功的报价。

command-line options history

52
推荐指数
3
解决办法
3万
查看次数

带连字符或不带连字符的命令选项

为什么有些命令(在 Linux 用户中)使用连字符运行而其他命令则没有?

例如,ls -lrm -r对比ps axtar xvf

我看是有历史原因的,但是意思是一样的,为什么不统一呢?

command-line

6
推荐指数
1
解决办法
2969
查看次数

标签 统计

command-line ×2

history ×1

options ×1