command line way to determine disk size (in MB or GB)

From: Gene Matthews (gene@mmc-inc.com)
Date: Mon Dec 30 2002 - 09:15:00 EST


I feel somewhat silly having to ask this. I must me missing something
searching with 'man -k'.

I'm looking for a way from the command line to determine the size (in MB or
GB) of a disk.

I have looked at prtvtoc and devinfo, but they seem to only give numbers
like 'blocks per cylinder', 'bytes per block', and number of cylinders. I
know I can do the math with those numbers and come up with those commands,
but I was hoping for something that I could do from the command line and
then just grep/awk what I needed from the output.

Is there command that will provide this information? I thought prtvtoc
might do it since with the 'format' command when you print the partition
table it will show you sizes by partition in gigabytes. If I could get that
output from the command line, I can grep/awk out what I need.

Any thoughts? Am I missing something obvious?

Thanks,

Gene
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:31 EDT