Where’s all that disk space being used?

Sometimes there are systems that seems to get clogged full of disk space and it may be unapparant where the space is being used.
I put together a couple commands to get a sense of the disk consumption.

Just copy and paste these into your terminal:

echo "Files bigger than 100Mb:"
find / -size +100000000c -ls |awk '{print $7" "$11}' |sort -rn |awk '{print $2}'|xargs du -sh

echo "Top 20 largest directories"
du -sm /*/* --exclude=/proc/* |sort -rn |head -20 |awk '{print $2}' |xargs du -sh

This entry was posted in General. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>