如何在/ home /中找到大型文件(> 100 MB)进行“清理”?
这是Centos 6.x.我尝试了一些命令,但它们没有用.
解决方法
Find有它自己的-delete选项
find /home -type f -size +100M -delete
应该做你想做的事.请注意放置-delete选项的位置
Warnings: Don’t forget that the find command line is evaluated
as an expression,so putting -delete first will make find try to
delete everything below the starting points you specified.
如果你想在使用它之前测试它,那么你需要添加-depth,因为-delete暗示它.
find /home -type f -size +100M -depth
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。