技术知识库

帮助中心 >  产品文档 >  云服务器 >  rm无法删除以破折号开头的文件

rm -slow_query_130103.txt.gz

 

rm: invalid option — s

 

Try `rm ./-slow_query_130103.txt.gz’ to remove the file `-slow_query_130103.txt.gz’.

 

Try `rm –help’ for more information.

官方在帮助文档中作了特别说明:

 

To remove a file whose name starts with a `-‘, for example `-foo’,use one of these commands:


rm — -foo


rm ./-foo

解决这个问题的一个方法就是在要删除的文件的前边加上”./”


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: