-   Linux - Newbie (
-   -   Hard drive size? (

tgardner 08-28-2003 09:20 PM

Hard drive size?
Is there a linux command to will tell the size (capacity) of a drive?

MasterC 08-28-2003 09:26 PM

df -h

It will need to be mounted, otherwise you can:
fdisk -l

To display the cylinders and such...

Other options might be to check the BIOS, it usually reports the size in there.


Selos 08-28-2003 09:28 PM

could he use du / -bh | more too?

i tried it just before and because of the access denied i think you have to type this as root

MasterC 08-28-2003 09:31 PM

That doesn't really provide general information on the entire drive though, that lists how much each folder holds, but it's a good command nonetheless ;)

df is for the entire mounted partition, du is for directories.

And as a side note:
more is not as good as less. Less is a more versatile text reader, IMHO..


Selos 08-28-2003 09:46 PM


Originally posted by MasterC
but it's a good command nonetheless ;)

yep, your signature holds some very interesting links but i did not finish the commands page yet :)

All times are GMT -5. The time now is 10:04 AM.