linux检查磁盘空间已满问题

时间:2021-12-14 08:49:58

2015-11-18

 du -ch --max-depth=1 ./

【例子】

[root@prod-db1 ~]# du -ch --max-depth=1 /
4.0K    /srv
27M    /lib64
7.7G    /swapadd
409M    /dev
4.0K    /cgroup
0    /misc
37M    /etc
4.0K    /media
4.0K    /.pulse
0    /sys
du: cannot access `/proc/46542/task/46542/fd/4': No such file or directory
du: cannot access `/proc/46542/task/46542/fdinfo/4': No such file or directory
du: cannot access `/proc/46542/fd/4': No such file or directory
du: cannot access `/proc/46542/fdinfo/4': No such file or directory
du: cannot access `/proc/46548': No such file or directory
0    /proc
9.1M    /bin
3.9M    /tmp
54M    /boot
4.0K    /selinux
0    /net
16M    /sbin
245M    /lib
16K    /data
381G    /u01
6.2G    /usr
8.0K    /mnt
754M    /home
12K    /.dbus
19G    /root
631M    /var
3.5G    /mount_point
16K    /lost+found
3.3G    /opt
422G    /
422G    total
[root@prod-db1 ~]# cd /u01/app/ && du -ch --max-depth=1 ./
128G    ./grid
4.1M    ./oraInventory
7.0G    ./oracle
246G    ./11.2.0
381G    ./
381G    total
[root@prod-db1 app]# cd 11.2.0/grid/ && du -ch --max-depth=1 ./
1.8M    ./OPatch
5.0M    ./assistants
236K    ./css
36M    ./jlib
20K    ./dbs
12K    ./dc_ocm
187M    ./oc4j
33M    ./nls
396K    ./deinstall
516M    ./install
340K    ./precomp
40M    ./oracore
804K    ./usm
12K    ./hs
58M    ./cdata
7.1M    ./network
2.6M    ./sysman
12K    ./mesg
7.3M    ./ord
12K    ./ohasd
8.0K    ./gns
12K    ./mdns
36K    ./auth
16K    ./diagnostics
12K    ./ctss
763M    ./bin
745M    ./rdbms
1.7M    ./owm
40K    ./clone
193M    ./crf
709M    ./lib
97M    ./cv
1.6M    ./plsql
1.1M    ./demo
101M    ./javavm
1.5M    ./instantclient
242G    ./log
160K    ./gpnp
8.0K    ./utl
9.9M    ./srvm
29M    ./md
60M    ./perl
12K    ./ologgerd
16K    ./slax
12K    ./scheduler
340M    ./inventory
2.6M    ./ldap
436K    ./sqlplus
1.7M    ./cfgtoollogs
12K    ./osysmond
328K    ./racg
29M    ./oui
536K    ./opmn
8.0K    ./eons
24K    ./csmig
244K    ./xdk
4.2M    ./evm
84K    ./relnotes
12K    ./gipc
1.9M    ./has
26M    ./jdbc
7.0M    ./crs
556K    ./wwg
85M    ./jdk
246G    ./
246G    total