I’m still running out of space

A server has no space! Where has it all gone? I want to see a list of where the disk usage is. Linux has a built in function du but that’s rather limited sometimes.

du -mxS / | sort -n | tail

This will return a sorted list of the hungriest/biggest folders, piped through sort to show in ascending order the biggest at the bottom, then tailed to show the last (biggest) few results.

Another way is to use

du -a --max-depth=3 / | sort -n | awk '{if($1 > 102400) print $1/1024 "MB" " " $2 }'

Codemonkey of Node.js, Django, PHP and all things HTML5 Solving tech challenges, one bit at a time.

Posted in linux Tagged with: , , ,

Leave a Reply

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

*