df

Introduction

The df command is used to check the file system space usage.


Syntax

df [OPTION]... [FILE]...


Important Flags

FlagDescription

-a or --all

Includes pseudo, duplicate, and inaccessible file systems in the output.

-B or --block-size=

Scales sizes by SIZE before printing them.

-H or --si

Prints sizes in a human-readable format using power of 1000.

-h or --human-readable

Prints sizes in a human-readable format. Print sizes in powers of 1024 (e.g., 1023M)

--help

Display this help and exit.

--inodes

Lists inode information instead of block usage.

-l or --local

Limits listing to local file systems.

--no-sync

Do not invoke sync before getting usage info (default).

--output[=FIELD_LIST]

Use the output format defined by FIELD_LIST, or print all fields if FIELD_LIST is omitted.

-P or --portability

Use the POSIX output format.

-T,--print-type

Prints file system type.

-s, --summarize

Get a summary of the directory's usage in a human-readable format.

--sync

Invoke sync before getting usage info.

--time

Show the time of the last modification to any file in the directory or subdirectory.

-t, --type=TYPE

Limit listing to file systems of type TYPE.

-v

(Ignored).

--version

Output version information and exit.


Examples

CommandDescription

Check disk usage on all mounted filesystems.

Display available space on the current file system.

Check disk usage in a human-readable format.

Show total available disk space.

Show only the total available disk space.

Check disk space available on the root mount point.

Check disk space available on the /boot mount point.

Customize the output to show only specific fields.

Show inode usage on each mounted filesystem.

Display information about /test file system in 1024-byte blocks.

Display information about /test file system in MB blocks.

Display information about all locally file systems.

Last updated