df - Linux command line tool to display disk space usage
df - Linux command line tool to display disk space usage
-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si
likewise, but use powers of 1000 not 1024
-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)
-P, --portability
use the POSIX output format
--sync invoke sync before getting usage info
-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
Examples
If you use df with no options it will display all the available filesystems' info
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 151225248 16280980 127262392 12% /
tmpfs 517924 0 517924 0% /lib/init/rw
udev 10240 60 10180 1% /dev
tmpfs 517924 0 517924 0% /dev/shm
/dev/sdb1 76896316 54820876 18169240 76% /media/discob
sshfs#ggarron@alketech.com:/home/ggarron/
7999999992 0 7999999992 0% /mnt/remote
To better understand what is in the screen can be used the -h (human readable)
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 145G 16G 122G 12% /
tmpfs 506M 0 506M 0% /lib/init/rw
udev 10M 60K 10M 1% /dev
tmpfs 506M 0 506M 0% /dev/shm
/dev/sdb1 74G 53G 18G 76% /media/discob
sshfs#ggarron@alketech.com:/home/ggarron/
7.5T 0 7.5T 0% /mnt/remote
To display only local mounted systemfilesystems use the -l (local) options, you will see the sshfs remote filesystem is not shown anymore.
$ df -hl
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 145G 16G 122G 12% /
tmpfs 506M 0 506M 0% /lib/init/rw
udev 10M 60K 10M 1% /dev
tmpfs 506M 0 506M 0% /dev/shm
/dev/sdb1 74G 53G 18G 76% /media/discob
You can use it pointed to the device path or to the path where the filesystem is mounted
$ df -h /dev/sdb1
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 74G 53G 18G 76% /media/discob
$ df -h /media/discob/
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 74G 53G 18G 76% /media/discob