参见英文答案 >
How to remove files starting with double hyphen?7个
> rm cannot delete files starting with — 3个
在脚本出错后,我最终得到了一个名称以短划线’ – ‘开头的文件
> rm cannot delete files starting with — 3个
在脚本出错后,我最终得到了一个名称以短划线’ – ‘开头的文件
-myfile.txt
我到目前为止尝试过:
rm -myfile.txt rm: illegal option -- m usage: rm [-f | -i] [-dPRrvW] file ... unlink file rm "-myfile.txt" rm: illegal option -- m usage: rm [-f | -i] [-dPRrvW] file ... unlink file rm "\-myfile.txt" rm: \-myfile.txt: No such file or directory rm \-myfile.txt rm: illegal option -- m usage: rm [-f | -i] [-dPRrvW] file ... unlink file rm "-"myfile.txt rm: illegal option -- m usage: rm [-f | -i] [-dPRrvW] file ... unlink file
你有什么主意吗 ?
谢谢
感谢@ ajp15243:
答案是 :
原文链接:https://www.f2er.com/bash/384666.html答案是 :
rm ./-myfile.txt
要么
rm -- -myfile.txt