LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to check free disk space (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-check-free-disk-space-368637/)

TigerLinux 10-01-2005 12:20 AM

How to check free disk space
 
fdisk -l shows u your partitions' names
how about to know the free space available?

Dark_Helmet 10-01-2005 12:26 AM

df -h /path/to/dir

That requires you to know where your partitions are mounted. A look at /etc/fstab will set things straight if you have trouble remembering.

Optimistic 10-01-2005 02:03 AM

df -h

With no options will give you free space of all mounted drives---no need to worry about fstab or remembering.

Ahmed 10-01-2005 02:30 AM

If you have QTParted (GUI partitioning software) it'll give you the details about every partition.

-A

reddazz 10-01-2005 02:34 AM

Quote:

Originally posted by Optimistic
df -h

With no options will give you free space of all mounted drives---no need to worry about fstab or remembering.

df on its own does the same thing without any flags.

Optimistic 10-02-2005 06:30 AM

Quote:

Originally posted by reddazz
df on its own does the same thing without any flags.
Yep, but the h flag makes it easier to read. The h is for human-readable, after all.

reddazz 10-02-2005 09:23 AM

Quote:

Originally posted by Optimistic
Yep, but the h flag makes it easier to read. The h is for human-readable, after all.
To clarify my point, on most Linux distros running "df -h" and "df" results in the same output (human-readable form usually in gigabytes), so its not necessary to use "df -h" unless you want to.

bulliver 10-02-2005 09:07 PM

Quote:

To clarify my point, on most Linux distros running "df -h" and "df" results in the same output (human-readable form usually in gigabytes), so its not necessary to use "df -h" unless you want to.
Really? I've never seen that before in 4 years of using linux.
Are you sure you don't have a bash alias for df?

reddazz 10-03-2005 02:34 AM

Quote:

Originally posted by bulliver
Really? I've never seen that before in 4 years of using linux.
Are you sure you don't have a bash alias for df?

Nope, I have not setup any aliases but this could have been done by the distro.

VRV 10-04-2005 05:04 PM

Thank you. df -h is suitable.


All times are GMT -5. The time now is 06:08 AM.