find-size查出指定⽂件⼤⼩的命令find -size n [c]
查n值⼤⼩的⽂件,默认单位是块(1块=512字节)
1. 查⼤于1500字节的⽂件
find ~ -size +1500c
2. 查等于1500字节的⽂件
find ~ -size 1500c
3. 查⼩于1500字节的⽂件
find ~ -size -1500c
4. 查⼤于512k字节的⽂件
find ~ -size +512k
5. 查等于1M字节的⽂件
find ~ -size 1M
6. 查⼩于1G字节的⽂件
find ~ -size -1G
7. 查⼤于10块的⽂件
find ~ -size +10
8. 查等于10块的⽂件
find ~ -size -10
9. 查⼤于10M⼩于20M的⽂件
find ./ -size +10M -size -20M
10. 查⼩于10块的⽂件
find ~ -size -10
find查命令的使用
11. 查⽂件/⽬录字节为0的⽂件(即空⽂件)
find / -empty

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。