Determining Free Disk Space On Linux

March 6th, 2006 § 0 comments

This will let you know how to determine free disk space on a *nix box (Linux, FreeBSD, Mac OS X, Solaris, etc.) The man page for df says this:

df - report filesystem disk space usage

When I type df -k on one of my Linux machines, it tells me how much free space (in Kilobytes) I have on each of my mounted filesystems. Here is the output:

[daniel@localhost daniel]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 76541056 31788324 40864604 44% /
/dev/hda1 101089 9272 86598 10% /boot
none 188248 0 188248 0% /dev/shm

This tells me that I have about 56% free space on my main /dev/hda2 partition, which is mounted at /. This translates into roughly 40864604 Kilobytes, or 40GB.

Your output will vary depending on the number of filesystems you have, and where they are.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

What's this?

You are currently reading Determining Free Disk Space On Linux at humandoing software.

meta