checking disk space using df and du

August 31st, 2006 mysurface Posted in Common, df, du | Hits: 107248 | 14 Comments »

The common way to check for all partition disk space, how much is still remain, you can simple use

df -h

Usually I will put -h to make it size human readable.

Another good tools to check the disk space for directories, we use du. You may realized that when you type ls -l, the size of every directories have the same size 4096, it is because directories is actually a file. But for us, we want to know how large the load it store instead the directory file itself.

To show all directories size including sub directories, type

du -h

To calculate the current directory size you are in (-s stand for summary)

du -sh

To show all the 1 level sub directories size (which you are not interested at sub sub directories.)

du -sh *

To show the size of specific directory

du -sh /home

To show the size of all sub directories of a specific directory

du -sh /home/*

14 Responses to “checking disk space using df and du”

  1. […] The first thing I do is to check the hardisk with df, or fdisk […]

  2. […] But, there are no ways for you to scan remote side by specified any options through command line. If you need to analyze your disk usage with only a light command, you can try du and df. […]

  3. Cod no pain percocet pill prescription….

    Cod no pain percocet pill prescription….

  4. For a great tutorial on using the Linux df command checkout:

  5. Sup I thought that this checking disk space using df and du » Linux by Examples info was great hence we have included a trackback to it within our site, keep up your great work…

  6. Hi there, all is going perfectly here and ofcourse every one is sharing information, that’s in fact good, keep up writing.

    My web site; despicable me minion rush cheats [Penney]

  7. Thanks on your marvelous posting! I seriously enjoyed reading it, you could
    be a great author. I will make certain to bookmark your blog and definitely will
    come back in the future. I want to encourage you to continue your great posts, have a nice holiday weekend!

    Here is my blog post; Plants Vs Zombies 2 Hack

  8. I think this is one of the most significant information for me.
    And i’m glad reading your article. But should remark on few general things, The web site style is perfect,
    the articles is really excellent : D. Good job, cheers

  9. Thanks for another informative website. The place else may
    I am getting that kind of info written in such a perfect means?
    I have a challenge that I’m simply now working on, and
    I’ve been at the look out for such info.

  10. always i used to read smaller articles which as well clear their motive,
    and that is also happening with this piece of writing which I
    am reading now.

  11. What’s up, I want to subscribe for this weblog to take hottest updates, therefore where can i do it
    please help out.

  12. Hi there mates, nice post and nice arguments commented here, I am genuinely enjoying by these.

  13. excellent issues altogether, you just gained a new reader. What could you suggest about your submit that you simply made some days ago?
    Any sure?

  14. Hi there colleagues, how is everything, and what you wish for to say about this article,
    in my view its in fact amazing in favor of me.

Leave a Reply