How much space I am using? can't understand df

Posted on 2007-07-29
Last Modified: 2013-12-06
Sorry for this dumb question but can someone explain df for me and how much in GB my Linux and other stuff is occupying.

[root@localhost java]# df
Filesystem           1K-blocks      Used     Available     Use% Mounted on
                            18251068   2190848  15118140    13% /
/dev/hda1            101086        10817     85050          12% /boot
tmpfs                   127664         0            127664         0% /dev/shm

[root@localhost java]# uname -a
Linux localhost.localdomain 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:37:32 EDT 2006 i686 i686 i386 GNU/Linux
Question by:ramow
    LVL 142

    Accepted Solution

    18251068 => ~18GB disk  
    2190848 => ~2GB used
    15118140 => ~15GB free
       13% ->  from above it would be rather 12%, but the part listed under /boot has to be considered also.
    LVL 12

    Expert Comment

    Hi ramow, do
    [root@localhost java]# df -ah
    Than u can easily read the partition size in mb.


    Author Comment

    thanks dude

    Author Comment

    oops I accepted the second solution although I should have accepted the first. sorry angelIII, my bad!
    LVL 30

    Expert Comment

    by:Duncan Meyers
    df -h gives you the results in powers of 1024 - so MB or GB. df -H gives you the same results in powers of 1000 rather than 1024.
    LVL 30

    Expert Comment

    by:Duncan Meyers
    For example:
    [root@abcdefg root]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda2             4.9G  3.1G  1.5G  68% /
    /dev/sda1              99M   32M   62M  35% /boot
    none                  131M     0  131M   0% /dev/shm
    /dev/sda6             2.0G   98M  1.8G   6% /var/log
    [root@abcdefg root]# df -H
    Filesystem             Size   Used  Avail Use% Mounted on
    /dev/sda2             5.2GB  3.3GB  1.6GB  68% /
    /dev/sda1             104MB   34MB   65MB  35% /boot
    none                  138MB      0  138MB   0% /dev/shm
    /dev/sda6             2.1GB  103MB  1.9GB   6% /var/log

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
    Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now