今天发现云linux没空间了,找了下怎么查看哪些目录占用空间,如下:
[root@iZ258gu0zkwZ /]# du -s -h ./*
7.4M ./bin
6.0M ./boot
60K ./dev
64M ./etc
4.0K ./_handID.DAT
408M ./home
95M ./lib
16K ./lost+found
8.0K ./media
8.0K ./misc
8.0K ./mnt
2.4G ./opt
0 ./proc
2.9G ./root
34M ./sbin
8.0K ./selinux
8.0K ./srv
0 ./sys
28K ./tmp
2.3G ./usr
12G ./var
[root@iZ258gu0zkwZ /]# du -s -h ./var/*
12K ./var/account
45M ./var/cache
8.0K ./var/cvs
244K ./var/db
32K ./var/empty
8.0K ./var/games
67M ./var/lib
8.0K ./var/local
40K ./var/lock
92M ./var/log
4.0K ./var/mail
8.0K ./var/nis
8.0K ./var/opt
8.0K ./var/preserve
8.0K ./var/racoon
172K ./var/run
2.7M ./var/spool
8.0K ./var/tmp
12G ./var/www
24K ./var/yp
查看空间命令:
[root@iZ258gu0zkwZ /]# df -hl
文件系统 容量 已用 可用 已用% 挂载点
/dev/hda1 20G 20G 0 100% /
tmpfs 252M 0 252M 0% /dev/shm