Search notes:

Shell command: df

df [OPTION]… [FILE]…
df reports the amount of available space in the filesystems in which the files given as optional argument FILE to df reside.
If FILE is a mounted device node (eg /dev/nvme0n1p5), df` (intuitively) reports the figures for the mounted file system, not for the filesystem where that node is located.
If the argument FILE is not specified, df reports the sizes for all mounted devices.
Space is shown in 1K blocks, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used (but see also the environment variables DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE).

Options

-a --all include pseudo, duplicate, inaccessible file systems
-B --block-size= SIZE scale sizes by SIZE before printing them; e.g., '-BM' prints sizes in units of 1,048,576 bytes; see SIZE format be‐ low
-h --human-readable print sizes in powers of 1024 (e.g., 1023M)
-H --si print sizes in powers of 1000 (e.g., 1.1G)
-i --inodes list inode information instead of block usage
-k like --block-size=1K
-l --local limit 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 --portability use the POSIX output format
--sync invoke sync before getting usage info
--total elide all entries insignificant to available space, and produce a grand total
-t --type= TYPE limit listing to file systems of type TYPE
-T --print-type print file system type
-x --exclude-type= TYPE limit listing to file systems not of type TYPE
-v ignored
--help display this help and exit
--version output version information and exit

FIELD_LIST

FIELD_LIST is a comma-separated list of column names. The possible namesare

-T: determine file system

If df is given the -T flag, it additionally reports the file system type.

Determine the file system type of the current working directory

$ df --output=fstype . | tail -1
btrfs

Exclude temporary file systems

$ df -Th -x tmpfs

See also

Using df to determine where a directory is mounted.
du
Shell commands
Apparently, df does not report accurate figures for the amount of used and free space in a btrfs filesystem.

Index