How to check hard disk size in Linux from shell |
To find the amount of hard disk space and what’s free via the Linux shell use the df command. Here are a few examples:

I have an 80 GB hard drive with only 4% being used. Another check:

On this server there is a 20GB primary drive (see 17691725) that 24% is being used and a backup 40GB drive where 17% is being used for storing shoutcast content files.

An 8GB hard drive with 16% being used.
Conversion
1024 bytes = 1KB
1024 KB = 1 MB (Megabyte)
1024 MB = 1 GB (Gigabyte)
1024 GB = 1 TB (Terabyte)
EXAMPLE. 80GB hard drive = 83,886,080 KB




For linux, df -h is better. It writes it in “easy” viewable for humans.
Comment by darkmoon — December 20, 2006 @ 11:50 am PST
I’m a bytes kind of geek, I guess lol, good point on that modifier though, darkmoon, of which there are several. Where you been, mon? Holday crashing?
Comment by TDavid — December 20, 2006 @ 12:28 pm PST
I’m around. Just not ircing. Yup. holiday crashing.
Comment by darkmoon — December 20, 2006 @ 1:09 pm PST