O'Reilly logo

Linux® Desk Reference, Second Edition by Scott Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Commands

df

[option, …] [file,…]

Report the amount of space used and available on filesystem(s).

Example: To print out the current state of the filesystems with size in megabytes, use

df -h

where Filesystem is the disk partition corresponding to the mounted filesystem. Mounted on gives the entry in /etc/fstab corresponding to the disk partition. Size, Used, and Avail are the

Filesystem    Size  Used  Avail  Capacity Mounted on
/dev/hda5     167M   45M   114M     28%   /
/dev/hda7     402M  2.9M   379M      1%   /home
/dev/hda6     1.6G  815M   703M     54%   /usr

obvious (though normally displayed by block count rather than megabytes).

Filesystems do fill up. The following commands may be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required