字母使用单破折号和单词使用双破折号的惯例从何而来,为什么继续使用?
例如,如果我输入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即使没有成功的报价。
为什么有些命令(在 Linux 用户中)使用连字符运行而其他命令则没有?
例如,ls -l或rm -r对比ps ax或tar xvf?
我看是有历史原因的,但是意思是一样的,为什么不统一呢?