相关疑难解决方法(0)

Unix 工具:如果一个文件的名字减去一些东西怎么办?

我总是想知道:大多数 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)

这只是出于好奇;我没有这方面的用例。

linux unix bash gnu command-line-arguments

9
推荐指数
3
解决办法
2759
查看次数

标签 统计

bash ×1

command-line-arguments ×1

gnu ×1

linux ×1

unix ×1