查看磁盘占用
vanjay@VanJay:~$ df -h文件系统 容量 已用 可用 已用% 挂载点 udev 3.9G 0 3.9G 0% /dev tmpfs 789M 2.0M 787M 1% /run /dev/sdb5 9.4G 8.0G 926M 90% / tmpfs 3.9G 31M 3.9G 1% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/loop0 88M 88M 0 100% /snap/core/5662
/
分区空间都哪去了?
vanjay@VanJay:~$ sudo du -hsx /* | sort -rh | head -n 4016G /home3.9G /usr2.4G /var 792M /lib 451M /swapfile 252M /opt 140M /boot 21M /root 14M /etc 13M /bin 12M /sbin2.0M /run 132K /tmp 40K /snap 16K /lost+found8.0K /media4.0K /srv4.0K /mnt4.0K /lib644.0K /cdrom0 /vmlinuz.old0 /vmlinuz0 /sys0 /proc0 /initrd.img.old0 /initrd.img0 /dev
home
分区被什么占用了?
vanjay@VanJay:~$ sudo du -hsx /home/* | sort -rh | head -n 357.8G /home/data7.6G /home/vanjay 16K /home/lost+found
交互式查看
安装库
sudo apt install ncdu
比如查看/分区
ncdu 1.12 ~ Use the arrow keys to navigate, press ? for help--- / ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 3.9 GiB [##########] /usr 2.4 GiB [###### ] /var 791.2 MiB [# ] /lib 450.6 MiB [# ] swapfile 251.2 MiB [ ] /opt 139.8 MiB [ ] /boot 20.7 MiB [ ] /root 13.7 MiB [ ] /etc 12.3 MiB [ ] /bin 11.3 MiB [ ] /sbin 3.6 MiB [ ] .__deepin.lft 132.0 KiB [ ] /tmp 40.0 KiB [ ] /snap e 16.0 KiB [ ] /lost+found 8.0 KiB [ ] /media 4.0 KiB [ ] /lib64 e 4.0 KiB [ ] /srv e 4.0 KiB [ ] /mnt e 4.0 KiB [ ] /cdrom 4.0 KiB [ ] .__deepin.num @ 0.0 B [ ] initrd.img.old @ 0.0 B [ ] initrd.img @ 0.0 B [ ] vmlinuz.old @ 0.0 B [ ] vmlinuz> 0.0 B [ ] /sys> 0.0 B [ ] /run> 0.0 B [ ] /proc> 0.0 B [ ] /home> 0.0 B [ ] /dev Total disk usage: 7.9 GiB Apparent size: 7.8 GiB Items: 209677
可使用方向键逐级查看
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/8643.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
休息一下~~