我总是想知道:大多数 GNU/Unix 工具都采用“减去某物”形式的选项,有时后跟一个参数。如果您有一个名为减去某些内容的文件怎么办?
$ ls
-f
$ rm -f
$ ls
-f
$ mv -f abc
mv: missing destination file operand after `abc'
Try `mv --help' for more information.
$ cat -f
cat: invalid option -- 'f'
Try `cat --help' for more information.
Run Code Online (Sandbox Code Playgroud)
或者
$ ls
-ohello.c
$ gcc -ohello -ohello.c
gcc: fatal error: no input files
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
这只是出于好奇;我没有这方面的用例。