Linux – List Folder Size, sort it, and display in human readable format

Cheat Code
du -h | sort -hr

As usual something disturbing my lovely day.
There’s a notification sent to my usually empty mailbox.
And it said “Low Disk Space” on one of my Linux server named “LOVELY”.

Then I think “That’s no way it can happen… I shower the server with lots of LOVE”, sigh…
Okay time to give it a visit!

After spending time going around and check, finally I found the bad boy.
somehow /var/log folder grown too big for unknown reason and I need to know who deploy something and start doing “DEBUG” log on production LOVELY server.

So I press the cheat combo above and I got the result!
FOUND YOU!

du -h | sort -hr output

Published by Feivel

We love to travel!

Leave a comment

Design a site like this with WordPress.com
Get started