What’s taking up the space?

There was a case where one of my CentOS servers running out of space at the root which is mapped to /dev/sda5. I didn’t think I was using it much but the df -h was telling me otherwise. So here is what I did.

$ cd /
$ sudo du -h --max-depth=1

The command shows which directory is taking up how much space in human readable format. Thanks to that, I figured out what the problem was. 🙂

Author: admin

A software engineer in greater Seattle area

Leave a Reply

Your email address will not be published. Required fields are marked *