linux 查找指定大小文件和大目录

查找>4G文件

find . -type f -size +4G

查找<4G文件

find . -type f -size -4G

查找大于40M小于30M的文件

find -size +30M -size -40M

配合 -exec 输出更多信息

find . -type f -size +4G -exec ls -lh {} +

查找大目录

du -Sh | sort -rh | head -5

不包括子目录

du -hs * | sort -rh | head -5