df Linux Commands

What is Linux df Command?

Explanation

df COMMAND:

df command is used to report how much free disk space is available for each mount you have. The first column show the name of the disk partition as it appears in the /dev directory. Subsequent columns show total space, blocks allocated and blocks available.

SYNTAX :


df [options]

OPTIONS:


-a Include dummy file systems.
-h Print sizes in human readable format.(e.g., 1K 234M 2G)
-H Print sizes in human readable format but use powers of 1000 not 1024.
-i List inode information instead of block usage.
-l Limit listing to local file systems.
-P Use the POSIX output format.
-T Print file system type.

EXAMPLE:


  1. df
    Output:
    Filesystem
    1K-blocks
    Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00
    150263916 14440324 128067408 11% / /dev/sda1
    101086
    10896
    84971 12% /boot tmpfs
    253336
    0
    253336
    0% /dev/shm In the above output: /dev/mapper/VolGroup00-LogVol00 -> Specifies FileSystem. /dev/sda1
    -> Specifies FileSystem. tmpfs
    -> Specifies FileSystem.

    Prints default format.
  2. df -h
    Output:
    Filesystem
    Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00
    144G
    14G 123G 11% / /dev/sda1
    99M
    11M
    83M 12% /boot tmpfs
    248M
    0 248M
    0% /dev/shm

    Print size in human readable format.
  3. df -H
    Output:
    Filesystem
    Size
    Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00
    154G
    15G
    132G 11% / /dev/sda1
    104M
    12M
    88M 12% /boot tmpfs
    260M
    0
    260M
    0% /dev/shm

    Print size in human readable format but use powers of 1000 not to 1024.

Ask Questions

Ask Question