Skip to content

Linux Quickie: Get Disk Space Usage

Getting the disk space usage in Linux is easy! Learn how to with this quickie!


The fastest way to get disk space usage in Linux is with the disk free command:

The disk free command (df) displays information about the disks in the system by using the -h flag as an option, it will display sizes in human readable formats.

$df -h

Will return a table with the following contents:

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 512G 500G 12G 98% /
etc…

More Ways to get disk space usage

Ravie Savie explains the usage of du and df in a more detailed way on his blog:

More Linux Quickies

Check out this mornings post about truncating files without losing permissions.

 

Published inLinuxNewsQuickies

Be First to Comment

Leave a Reply

%d bloggers like this: