10 Useful du (Disk Usage) Commands to Find Disk Usage of Files and Directories

Download all articles in PDF format with our TecMint Content Subscription and Linux Support Services starting at $10 per month.

Support TecMint: Did you find this tutorial helpful?. Please help to keep it alive by donating. Every cent counts! - Donate Now

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

20 Responses

  1. rlinux57 says:

    Is is possible to collect historical data analysis of disk space usage per user ?

    • Ravi Saive says:

      @rlinux,

      No you can’t use du (disk usage) command to get the disk space usage per user, yes but you can do use some command-line tricks with the help of find and awk command to find out the disk space usage for all users on the system including root user, here is the command.

      # find . -printf "%u  %s\n" | awk '{user[$1]+=$2}; END{ for( i in user) print i " " user[i]}'
      
  2. rosh says:

    Another nice option is to sort by size: du -h * | sort -h

  3. Ashish Karpe says:

    how to find du of / ie when I ran du -sh / it gives du: cannot access `./proc/14498/task/14518/fdinfo/35147′: No such file or directory
    du: cannot access `./proc/14498/task/14518/fdinfo/35156′: No such file or directory

  4. Yasminhth says:

    Thanks for tips. Well explain ans example

  5. abhi says:

    very nice work. It helped me.

Got something to say? Join the discussion.

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

Join Over 95000+ Linux Users
  1. 77,543
  2. 4,213
  3. 35,218

Enter your email to get latest Linux Howto's