0

today my server crashed and I realized that it was because there was no more space available on my disk

When I enter df -H I've got this :

udev            997M     0  997M   0% /dev
tmpfs           203M  1.1M  202M   1% /run
/dev/sda1        21G   21G   76M 100% /

So the files that takes a lot of space is in /

but when I type ls -a -Ssl --block-size=k / I've got this :

16K drwx------   2 root root 16K Sep 30 21:59 lost+found
 4K drwxr-xr-x  19 root root  4K Feb 17 15:01 .
 4K drwxr-xr-x  19 root root  4K Feb 17 15:01 ..
 4K drwxr-xr-x   4 root root  4K Feb  9 06:52 boot
 4K drwxr-xr-x 102 root root  4K Feb 10 06:19 etc
 4K drwxr-xr-x   4 root root  4K Nov 14 18:12 home
 4K drwxr-xr-x   2 root root  4K Sep 30 21:43 media
 4K drwxr-xr-x   2 root root  4K Sep 30 21:43 mnt
 4K drwxr-xr-x   2 root root  4K Sep 30 21:43 opt
 4K drwx------   7 root root  4K Feb 17 15:04 root
 4K drwxr-xr-x   7 root root  4K Nov 14 19:19 snap
 4K drwxr-xr-x   2 root root  4K Sep 30 21:43 srv
 4K drwxrwxrwt  12 root root  4K Feb 17 15:09 tmp
 4K drwxr-xr-x  15 root root  4K Sep 30 21:50 usr
 4K drwxr-xr-x  14 root root  4K Feb 17 15:00 var
 0K drwxr-xr-x  19 root root  4K Feb 17 15:01 dev
 0K drwxr-xr-x  30 root root  1K Feb 17 15:08 run
 0K lrwxrwxrwx   1 root root  1K Sep 30 21:43 libx32 -> usr/libx32
 0K lrwxrwxrwx   1 root root  1K Sep 30 21:43 lib32 -> usr/lib32
 0K lrwxrwxrwx   1 root root  1K Sep 30 21:43 lib64 -> usr/lib64
 0K lrwxrwxrwx   1 root root  1K Sep 30 21:43 sbin -> usr/sbin
 0K lrwxrwxrwx   1 root root  1K Sep 30 21:43 bin -> usr/bin
 0K lrwxrwxrwx   1 root root  1K Sep 30 21:43 lib -> usr/lib
 0K dr-xr-xr-x 171 root root  0K Feb 17 15:00 proc
 0K dr-xr-xr-x  13 root root  0K Feb 17 15:00 sys

So It's like empty... I really don't understand from where these 21go comes from

Any ideas ?

Thank you and I wish you a great day :)

BKBN
  • 1

1 Answers1

3

ls doesn't calculate size of folder contents

you can use du to calculate folder content sizes

e.g sudo du / -d 1 -h -c

starting at root "/" one directory level "-d 1" human readable "-h" give total "-c"

can then repeat for large folders

you may get some "cannot access" for various reasons