checking disk space using df and du

August 31st, 2006 mysurface Posted in Common, df, du | Hits: 86705 | 8 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/*

8 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: http://www.lainoox.com/linux-df-command-example/

  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

Leave a Reply