0

These are the 10 heaviest directories on the system,

ubuntu@ip-172-31-25-207:/$ sudo du -hs * | sort -nr | head -n10
360M    lib
172M    opt
172M    boot
172K    tmp
41M run
29G var
28M home
16M bin
16K lost+found
15M root

This is the disk usage,

ubuntu@ip-172-31-25-207:/$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G     0  2.0G   0% /dev
tmpfs           396M   41M  355M  11% /run
/dev/xvda1       62G   60G  2.6G  96% /
tmpfs           2.0G     0  2.0G   0% /dev/shm

It says that 60gb is filled. Most of the data is log data, which is clear from the du output. The heaviest directory is 30gb.

What I am not able to figure out is where is the rest of the 30gb being used? What am I missing?

Luv33preet
  • 371
  • 1
  • 2
  • 10
  • 2
    Why do you use `head -n10`, maybe you have some 14G folders ? [See this](https://serverfault.com/questions/62411/how-can-i-sort-du-h-output-by-size). – pLumo Feb 26 '19 at 13:25
  • 2
    one central element tripping you up is asking `du` to report human-readable totals but not telling `sort` about it. change one or the other to get a clearer picture – Jeff Schaller Feb 26 '19 at 23:08

0 Answers0