查看所有空间文件所占的空间大小

[root@Hadoop modules]# du -sh /*

7.3M    /bin

64M    /boot

304K    /dev

40M    /etc

88K    /home

325M    /lib

43M    /lib64

16K    /lost+found

4.0K    /media

8.0K    /mnt

3.4G    /opt

du: cannot access `/proc/3185/task/3185/fd/4': No such file or directory

du: cannot access `/proc/3185/task/3185/fdinfo/4': No such file or directory

du: cannot access `/proc/3185/fd/4': No such file or directory

du: cannot access `/proc/3185/fdinfo/4': No such file or directory

0    /proc

344M    /root

16M    /sbin

0    /selinux

4.0K    /srv

0    /sys

424M    /tmp





rm: cannot remove `CentOS_6.8_Final/Packages/sat4j-2.2.0-4.0.el6.noarch.rpm': Read-only file system

rm: cannot remove `CentOS_6.8_Final/Packages/un-core-batang-fonts-1.0.2-0.15.080608.el6.noarch.rpm': Read-only file system
rm: cannot remove `CentOS_6.8_Final/Packages/un-core-fonts-common-1.0.2-0.15.080608.el6.noarch.rpm': Read-only file system

rm: cannot remove `CentOS_6.8_Final/TRANS.TBL': Read-only file system
rm: cannot remove `CentOS_6.8_Final/.discinfo': Read-only file system
rm: cannot remove `CentOS_6.8_Final/.treeinfo': Read-only file system
[root@CentOSB media]# ll
total 4
dr-xr-xr-x. 7 root root 4096 May 23 2016 CentOS_6.8_Final
[root@CentOSB media]# du -sh * | sort -nr
3.7G CentOS_6.8_Final
[root@CentOSB media]# du -sh * | sort -nr
3.7G CentOS_6.8_Final
[root@CentOSB media]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root
558624 264038 294586 48% /
tmpfs 126430 4 126426 1% /dev/shm
/dev/sda1 128016 44 127972 1% /boot
/dev/sr0 0 0 0 - /media/CentOS_6.8_Final
[root@CentOSB media]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
8.3G 8.3G 0 100% /
tmpfs 494M 76K 494M 1% /dev/shm
/dev/sda1 477M 66M 386M 15% /boot
/dev/sr0 3.7G 3.7G 0 100% /media/CentOS_6.8_Final
[root@CentOSB media]# umount /media/CentOS_6.8_Final/
[root@CentOSB media]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
8.3G 8.3G 0 100% /
tmpfs 494M 76K 494M 1% /dev/shm
/dev/sda1 477M 66M 386M 15% /boot
[root@CentOSB media]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root
558624 264038 294586 48% /
tmpfs 126430 4 126426 1% /dev/shm
/dev/sda1 128016 44 127972 1% /boot
[root@CentOSB media]# cd ..
[root@CentOSB /]# cd /
[root@CentOSB /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
8.3G 8.3G 0 100% /
tmpfs 494M 76K 494M 1% /dev/shm
/dev/sda1 477M 66M 386M 15% /boot
[root@CentOSB /]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root
558624 264038 294586 48% /
tmpfs 126430 4 126426 1% /dev/shm
/dev/sda1 128016 44 127972 1% /boot
[root@CentOSB /]# free
total used free shared buffers cached
Mem: 1011440 945132 66308 2796 78252 529972
-/+ buffers/cache: 336908 674532
Swap: 1048572 0 1048572
[root@CentOSB /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
8.3G 8.3G 0 100% /
tmpfs 494M 76K 494M 1% /dev/shm
/dev/sda1 477M 66M 386M 15% /boot
[root@CentOSB /]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root
558624 264038 294586 48% /
tmpfs 126430 4 126426 1% /dev/shm
/dev/sda1 128016 44 127972 1% /boot
[root@CentOSB /]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root
558624 264038 294586 48% /
tmpfs 126430 4 126426 1% /dev/shm
/dev/sda1 128016 44 127972 1% /boot
[root@CentOSB /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
8.3G 8.3G 0 100% /
tmpfs 494M 76K 494M 1% /dev/shm
/dev/sda1 477M 66M 386M 15% /boot
[root@CentOSB /]# cd
[root@CentOSB ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
8.3G 8.3G 0 100% /
tmpfs 494M 76K 494M 1% /dev/shm
/dev/sda1 477M 66M 386M 15% /boot
[root@CentOSB ~]# umount /
umount: /: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
[root@CentOSB ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
8.3G 8.3G 0 100% /
tmpfs 494M 76K 494M 1% /dev/shm
/dev/sda1 477M 66M 386M 15% /boot
[root@CentOSB ~]# umount /dev/mapper/VolGroup-lv_root
umount: /: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
[root@CentOSB ~]# ls
anaconda-ks.cfg Desktop Documents Downloads install.log install.log.syslog Music Pictures Public Templates Videos zookeeper.out
[root@CentOSB ~]# pwd
/root

[root@CentOSB ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
8.3G 8.3G 0 100% /
tmpfs 494M 76K 494M 1% /dev/shm
/dev/sda1 477M 66M 386M 15% /boot
[root@CentOSB ~]# mount /media/CentOS_6.8_Final/
mount: can't find /media/CentOS_6.8_Final/ in /etc/fstab or /etc/mtab
[root@CentOSB ~]# du -sh /*
7.7M /bin
64M /boot
308K /dev
40M /etc
4.0K /home
331M /lib
30M /lib64
16K /lost+found
4.0K /media
0 /misc
4.0K /mnt
0 /net
^A3.7G /opt
du: cannot access `/proc/5755/task/5755/fd/4': No such file or directory
du: cannot access `/proc/5755/task/5755/fdinfo/4': No such file or directory
du: cannot access `/proc/5755/fd/4': No such file or directory
du: cannot access `/proc/5755/fdinfo/4': No such file or directory
0 /proc
27M /root
17M /sbin
0 /selinux
4.0K /srv
0 /sys
240K /tmp