Where is the 3GB+ hidding?

2

I have the problem of /usr taking too much space on the server.

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

but when i do a ls -la on the /usr directory, there isn't any big file:

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

alvas

Posted 2014-01-30T12:47:13.363

Reputation: 95

Answers

4

When you want to find out the total size of a folder including subfolder, you might want to use du.

For example:

du --max-depth=1 -h

That would list the total size of each item in the current folder with human-readable sizes.

Der Hochstapler

Posted 2014-01-30T12:47:13.363

Reputation: 77 228

If you want to sort by size, pipe into sort -hr. – slhck – 2014-01-30T12:55:08.003

1@Oliver - Excellent command for disk space in Linux! – Rudolph – 2014-01-30T13:01:27.423