Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-12-2004, 12:57 AM   #1
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Hard Drive capacity

Hi there,

Is there a command that will display a hard drive's full capacity size? I mean, output of a 'df -h' command yields:

Filesystem Size Used Avail Use% Mounted on
/dev/hda4 5.4G 1.2G 4.0G 22% /
/dev/hda2 273M 132M 128M 51% /home
/dev/hda1 7.6M 4.6M 2.6M 64% /boot

From calcuting the 'Size' column, this drive has a total capacity of 5.5GB. However, I don't want to calculate . Is there a command that will tell you that? Thanks...

Old 10-12-2004, 01:21 AM   #2
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30

fdisk -l (that is a lowercase L )

If you just run fdisk -l it will give you the size of each of your disks, if you have a whole bunch of disks you could run say fdisk -l /dev/hda and that will give you just the size of that single hard drive.

Good luck
Old 10-12-2004, 03:04 PM   #3
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Original Poster
Rep: Reputation: 52

twantrddeb:~# fdisk -l

That's all it shows. If I did fdisk -l /dev/hda then it prints out the geometry of the disk. Any other ideas?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
windows/linux hard drive capacity Vensan Linux - Hardware 2 01-19-2007 11:39 AM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 09:48 AM
Hard drive capacity suddenly "0" edlentz Linux - Hardware 2 08-05-2005 06:30 AM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 02:47 AM
ext3 formatted drive capacity smaller than ntfs gsupp Linux - General 12 07-25-2004 03:47 PM

All times are GMT -5. The time now is 01:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration