linux /dev/sda7快被占满了,揪出占用磁盘空间的罪魁祸首

编程入门 行业动态 更新时间:2024-10-15 20:20:37

linux /dev/sda7快被占满了,揪出占用磁盘空间的<a href=https://www.elefans.com/category/jswz/34/1764047.html style=罪魁祸首"/>

linux /dev/sda7快被占满了,揪出占用磁盘空间的罪魁祸首

磁盘空间已满,但是找不到占用空间的文件,整个故障排除过程如下:

[root@localhost opt]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda5       9.5G  6.1G  3.0G  68% /

tmpfs            24G  228K   24G   1% /dev/shm

/dev/sda1       190M   34M  146M  19% /boot

/dev/sda8        24G   44M   23G   1% /data

/dev/sda2       212G   50G  152G  25% /home

/dev/sda6       9.5G  8.2G  901M  91% /opt

/dev/sda7       9.5G  293M  8.8G   4% /var

[root@localhost opt]# du -sh /opt/*

556M    /opt/buildirm

16K     /opt/lost+found

4.0K    /opt/rh

[root@localhost opt]# df -i /opt

Filesystem     Inodes  IUsed  IFree IUse% Mounted on

/dev/sda6      640848 184516 456332   29% /opt

[root@localhost opt]# ls -al

总用量 40

drwxrwxrwx.  6 root root  4096 12月 16 09:46 .

dr-xr-xr-x. 29 root root  4096 4月  28 09:44 ..

drwxrwxrwx.  4 root root  4096 9月  16 2015 buildirm

-rw-------.  1 root root    39 12月 16 09:46 .directory

drwx------.  2 root root 16384 5月   8 2015 lost+found

drwxr-xr-x.  2 root root  4096 5月  17 2013 rh

drwx------.  4 root root  4096 9月  17 2015 .Trash-0

[root@localhost opt]# du --max-depth=1 -lh /opt

16K     /opt/lost+found

4.0K    /opt/rh

7.6G    /opt/.Trash-0  //终于找出占用磁盘空间的罪魁祸首了!

556M    /opt/buildirm

8.1G    /opt

[root@localhost opt]# du --max-depth=1 -lh --all /opt

16K     /opt/lost+found

4.0K    /opt/rh

7.6G    /opt/.Trash-0

556M    /opt/buildirm

4.0K    /opt/.directory

8.1G    /opt

更多推荐

linux /dev/sda7快被占满了,揪出占用磁盘空间的罪魁祸首

本文发布于:2024-03-11 15:13:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1729246.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:罪魁祸首   满了   磁盘空间   linux   dev

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!