Use du to show directory sizes only

By | 2013/01/11

du can show directory sizes only. This is helpful to get a quick glance at what directories are taking up space. Here’s the command I like to use:

$ du -hsc *

Here is what it looks like in action from /var on one of my servers:

user@li166-66:/var$ sudo du -hsc *
399M    backups
115M    cache
2.0G    lib
4.0K    local
0       lock
1.8G    log
4.0K    mail
4.0K    opt
0       run
2.3M    spool
4.0K    tmp
11G     www
16G     total


One thought on “Use du to show directory sizes only

  1. Ade Malsasa Akbar

    Thank you, keep your post in Linux 🙂 I am searching for up to date Linux blog via NetworkedBlog 🙂


Leave a Reply

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

Notify me of followup comments via e-mail. You can also subscribe without commenting.