我的Unix机器上有一些文件开头
--
Run Code Online (Sandbox Code Playgroud)
例如 --testings.html
如果我尝试删除它,我会收到以下错误:
cb0$ rm --testings.html
rm: illegal option -- -
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
Run Code Online (Sandbox Code Playgroud)
我试过了
rm "--testings.html" || rm '--testings.html'
Run Code Online (Sandbox Code Playgroud)
但没有任何作用.
如何在终端上删除这些文件?
在脚本出错后,我最终得到了一个名称以短划线' - '开头的文件
-
我到目前为止尝试过:
-myfile.txt
Run Code Online (Sandbox Code Playgroud)
你有什么主意吗 ?
谢谢