To remove a file whose name starts with a '-', for example '-foo', use one of these com‐
mands:
rm -- -foo
rm ./-foo
Note that if you use rm to remove a file, it might be possible to recover some of its con‐
tents, given sufficient expertise and/or time. For greater assurance that the contents
are truly unrecoverable, consider using shred.
使用
rm -fr -- 文件名没毛病
我也是首次遇到这个问题. 而我的方法是
man rm, 然后看到了下面这写内容:希望对您有用.
PS: 学习获取知识的方法比学知识要重要.
rm命令,参数,-r:递归,主要用于删除文件夹及文件,-f,强制删除;
P.S.删除之前可以三思啊,Linux可是没有回收站的...