You could also parse the output of good ol' fdisk — e.g. fdisk -l -u /dev/hda (-u to display the info in units of sectors (the size of which it'll tell you, too)). Problem might be (depending on context) that it'll need to be run as root...
In reply to Re: get the size of a special device (drive)
by almut
in thread get the size of a special device (drive)
by exodist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |