terminal.cab

All commands

df

Topic: Disks and space

Program: df

Shows how full the file systems are.

Package: core-inodes

Usage

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

Description

Show size, used and free space of each mounted file system, or of the one each FILE is on. Sizes are KiB unless -h is given.

Options in the simulator

14 more options of the real program, not in the simulator yet
  • -a, --all not in the simulator yet

    On a real system df also shows empty and duplicate file systems.

  • -B, --block-size needs a value not in the simulator yet

    On a real system it sets the unit of the sizes freely.

  • -H, --si not in the simulator yet

    On a real system df works like -h, but with 1000 instead of 1024.

  • -k not in the simulator yet

    On a real system df then counts in KiB, as it does without options.

  • -l, --local not in the simulator yet

    On a real system df leaves out network file systems.

  • --no-sync not in the simulator yet

    On a real system it decides whether df first writes pending data to disk.

  • --output value optional not in the simulator yet

    On a real system it lets you pick the columns yourself.

  • -P, --portability not in the simulator yet

    On a real system df prints the columns in the fixed POSIX format.

  • --sync not in the simulator yet

    On a real system it decides whether df first writes pending data to disk.

  • --total not in the simulator yet

    On a real system df adds a line with the sum.

  • -t, --type needs a value not in the simulator yet

    On a real system df shows only file systems of one type, or leaves a type out.

  • -x, --exclude-type needs a value not in the simulator yet

    On a real system df shows only file systems of one type, or leaves a type out.

  • -v not in the simulator yet

    On a real system -v does nothing.

  • --version not in the simulator yet

    On a real system it prints the version of the program.

Examples

From the lesson Where has the space gone
df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        40G   39G  1.4G  97% /
tmpfs           392M  1.1M  391M   1% /run
tmpfs           2.0G  4.0K  2.0G   1% /dev/shm
tmpfs           512M  4.0K  512M   1% /tmp

Try it in the terminal

Where you learn it

Lessons

All commands