[root@localhost opt]# df -hnode
Filesystem Size Used Avail Use% Mounted onide
/dev/sda5 9.5G 6.1G 3.0G 68% /ui
tmpfs 24G 228K 24G 1% /dev/shmspa
/dev/sda1 190M 34M 146M 19% /bootit
/dev/sda8 24G 44M 23G 1% /dataclass
/dev/sda2 212G 50G 152G 25% /homesed
/dev/sda6 9.5G 8.2G 901M 91% /optdi
/dev/sda7 9.5G 293M 8.8G 4% /var文件
[root@localhost opt]# du -sh /opt/*view
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 /opt16K /opt/lost+found4.0K /opt/rh7.6G /opt/.Trash-0556M /opt/buildirm4.0K /opt/.directory8.1G /opt