shell - linux怎么删除奇怪的文件
PHP中文网
PHP中文网 2017-04-17 16:31:12
[Linux讨论组]
PHP中文网
PHP中文网

认证高级PHP讲师

全部回复(4)
伊谢尔伦

使用rm -fr -- 文件名

rm -fr -- --exclude=xxx
高洛峰
rm -f ./--exclude*

没毛病

巴扎黑

我也是首次遇到这个问题. 而我的方法是man rm, 然后看到了下面这写内容:

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.

希望对您有用.

PS: 学习获取知识的方法比学知识要重要.

PHPz

rm命令,参数,-r:递归,主要用于删除文件夹及文件,-f,强制删除;
P.S.删除之前可以三思啊,Linux可是没有回收站的...

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号