首页 > 技术文章 > Linux 删除指定大小(范围)的文件

jhc888007 2019-05-24 15:25 原文

  • 200字节以下

find . -size -200c -exec rm {} \;

  • 2k

find . -size 2k -exec rm {} \;

  • 1m以上

find . -size +1m -exec rm {} \;

 

参考文献:

https://zhidao.baidu.com/question/457360584036726325.html

https://www.cnblogs.com/lanchang/p/6597372.html

推荐阅读