查看磁盘使用情况
df -h

查找文件
查找/usr 目录下大于10M的文件
find /usr -type f -size +10M

查找/usr 目录下大于10M的文件,并且使用ls -l 命令输出详细信息
find /usr -type f -size +10M -print0|xargs -0 ls -l

查找/usr 目录下大约10M的文件,并且使用du -h 命令输出文件的大小
find /usr -type f -size +10M -print0|xargs -0 du -h

查找/usr 目录下大约10M的文件,并且使用du -m 命令输出文件的大小,然后使用 sort -nr 从小到大排序、
find /usr -type f -size +10M -print0|xargs -0 du -h|sort -nr
find /usr -type f -size +10M -print0|xargs -0 du -h|sort -sh


网友评论