linux服务器磁盘满了,查找大文件

相信大家在工作过程中会遇到服务器磁盘满了的情况,此时该如何快速定位大文件呢?

其中主要可以通过find命令,df -h, du -sh 命令,即可排查大文件啦。


Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file:
Try using the -Djava.io.tmpdir= option to select an alternate temp location.

df -h 命令,查看磁盘占用情况,发现/目录下使用100%

可以使用find命令,查找大文件。

find / -type f -size +5000M

find / -size +100M -exec ls -lh {} \;     显示的文件信息更为详细。

也可以使用du -sh /* 进行文件夹大小统计,发现/soft目录占用较大

然后继续查看soft目录下的子目录哪个占用最大。

按照这种方法,最终找到大文件。

猜你喜欢

转载自blog.csdn.net/HelloKitty520123/article/details/92794594