Science and technology

Use df to examine free disk house on Linux

Drive house is not fairly as treasured because it was within the early days of computing, however regardless of how a lot house you’ve, there’s all the time the potential to expire. Computers want a bit of house simply to function, so it is vital to examine often to make sure you have not inadvertently used up actually all the house obtainable in your drive. In the Linux terminal, you are able to do that with the df command.

The df command shows the quantity of disk house obtainable on the file system.

To make the output straightforward so that you can learn, you need to use the --human-readable (or -h for brief) possibility:

$ df --human-readable
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       1.0T  525G  500G  52% /

In this instance, the pc’s drive is 52% full, with 500 GB free to be used.

Because Linux views its file system holistically throughout all mounted gadgets, the df command supplies you particulars for each storage gadget hooked up to your laptop. If you’ve a number of drives, then the output displays that:

$ df --human-readable
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       110G   45G   61G  43% /
devtmpfs         12G     zero   12G   zero% /dev
tmpfs            12G  848Okay   12G   1% /run
/dev/sda1       1.6T  1.3T  191G  87% /dwelling
/dev/sdb1       917G  184G  687G  22% /penguin
/dev/sdc1        57G   50G  four.5G  92% /sneaker
/dev/sdd1       three.7T  2.4T  1.3T  65% /tux

In this instance, the /dwelling listing of the pc is 87% full, with 191 GB free.

See complete disk house obtainable

If you do have a posh file system and wish to see the whole house throughout all drives, use the --total possibility:

$ df --human-readable --total
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       110G   45G   61G  43% /
devtmpfs         12G     zero   12G   zero% /dev
tmpfs            12G  848Okay   12G   1% /run
/dev/sda1       1.6T  1.3T  191G  87% /dwelling
/dev/sdb1       917G  184G  687G  22% /penguin
/dev/sdc1        57G   50G  four.5G  92% /sneaker
/dev/sdd1       three.7T  2.4T  1.3T  65% /tux
complete           6.6T  four.0T  2.5T  62% -

The remaining line of output supplies the whole house of the filesystem, complete house used, complete house obtainable.

See disk house utilization

To simply get a abstract of what is occupying the house in your drives, learn our article concerning the du command.

Most Popular

To Top