jump to navigation

Birds eye view folder used space, June 2, 2007

Posted by sandakith in linux.

Here’s a handy command sequence which you can run anywhere, anytime, so see which directories contain the most amount of data. It’s a really useful way to focus your attention on the biggest users of disk space.

$ du -k . | sort -rn | less

* ‘du -kh .’ means “Show disk usage (in human redable format)  for all directories in current directory”
* ‘sort -rn’ means “Sort in reverse numeric order (largest first)”
* ‘less’ is a handy favourite pager (When overflows output page).

This will give you a list of directory sizes followed by the directory name. The top ones are where you should focus your attention.



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: