If you work with Linux VM's, you know it can be a pain to find some deeply hidden large files sucking away at your storage. Fear not, use du
.
sudo du -shx /* | sort -h
It will return something like:
...
4K /opt
72K /root
764K /run
29M /etc
39M /boot
256M /home
889M /usr
33G /var
Looks like our /var
folder could use some further inspection, lets adjust our command:
sudo du -shx /var/* | sort -h
Then we see something like:
...
60K /var/spool
224M /var/cache
6.2G /var/log
27G /var/lib
It appears we have two more directories worthy of further digging.
We can adjust our command again to inspect /var/lib/*
or /var/log/*
respectively.
Good luck!
Top comments (0)