3GB+ 隐藏在哪儿?

3GB+ 隐藏在哪儿?

/usr我遇到了服务器占用太多空间的问题。

ws4-clarind:~ # df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/system-root  4.8G  988M  3.6G  22% /
udev                      35G  112K   35G   1% /dev
tmpfs                     35G     0   35G   0% /dev/shm
/dev/vda1                190M   49M  132M  27% /boot
/dev/mapper/system-opt   2.0G  185M  1.7G  10% /opt
/dev/mapper/system-tmp   4.0G   33M  4.0G   1% /tmp
/dev/mapper/system-usr   5.0G  3.8G  941M  81% /usr
/dev/mapper/system-var   4.0G  424M  3.4G  12% /var
/dev/vdb                1008G   14G  943G   2% /data

ls -la但是当我在目录中执行操作时/usr,没有任何大文件:

ws4-clarind:~ # cd /usr
ws4-clarind:/usr # ls -la
total 244
drwxr-xr-x  13 root root  4096 Jan 30 13:32 .
drwxr-xr-x  26 root root  4096 Jan 30 01:43 ..
drwxr-xr-x   5 root root  4096 Sep 27 22:24 X11R6
drwxr-xr-x   2 root root 61440 Jan 30 13:39 bin
drwxr-xr-x  80 root root 12288 Jan 30 01:53 include
drwxr-xr-x  61 root root 36864 Jan 30 13:39 lib
drwxr-xr-x  97 root root 69632 Jan 30 01:53 lib64
drwxr-xr-x  12 root root  4096 Sep 27 22:24 local
drwx------   2 root root 16384 Oct 13  2011 lost+found
drwxr-xr-x   2 root root 16384 Jan 30 13:39 sbin
drwxr-xr-x 162 root root  4096 Jan 30 13:39 share
drwxr-xr-x   7 root root  4096 Jan 30 01:43 src
lrwxrwxrwx   1 root root    10 Jan 30 01:43 tmp -> ../var/tmp
drwxr-xr-x   5 root root  4096 Sep 27 22:24 x86_64-suse-linux

答案1

当您想要找出文件夹(包括子文件夹)的总大小时,您可能需要使用du

例如:

du --max-depth=1 -h

这将以人类可读的大小列出当前文件夹中每个项目的总大小。

相关内容