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

11. 查找文件/目录字节为0的文件(即空文件)

find / -empty

原文地址:https://www.cnblogs.com/rusking/p/7403160.html