场景:当服务器空间被占满时,却不知道是哪里占用空间比较大的时候,可以使用该命令排查。
查看各挂载目录空间情况
[oracle@localhost database]$ df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 28G 16G 13G 55% /devtmpfs 895M 0 895M 0% /devtmpfs 910M 0 910M 0% /dev/shmtmpfs 910M 11M 900M 2% /runtmpfs 910M 0 910M 0% /sys/fs/cgroup/dev/sda1 297M 157M 140M 53% /boottmpfs 182M 4.0K 182M 1% /run/user/42tmpfs 182M 28K 182M 1% /run/user/1001[oracle@localhost database]$
使用下面的命令排查 ```bash [oracle@localhost database]$ ll total 44 drwxr-xr-x. 4 oracle oinstall 248 Aug 27 2013 install -rw-r—r—. 1 oracle oinstall 30016 Aug 26 2013 readme.html drwxr-xr-x. 2 oracle oinstall 61 Aug 26 2013 response drwxr-xr-x. 2 oracle oinstall 34 Aug 26 2013 rpm -rwxr-xr-x. 1 oracle oinstall 3267 Aug 26 2013 runInstaller drwxr-xr-x. 2 oracle oinstall 29 Aug 26 2013 sshsetup drwxr-xr-x. 14 oracle oinstall 4096 Aug 26 2013 stage -rw-r—r—. 1 oracle oinstall 500 Aug 26 2013 welcome.html [oracle@localhost database]$ du -sh * 2.1M install 32K readme.html 80K response 12K rpm 4.0K runInstaller 32K sshsetup 2.5G stage 4.0K welcome.html [oracle@localhost database]$
```
