I run the command df -g to get the GB block sizes in the second column (left to right). If I want to get the total capacity for all hard disks, which command should I use?

OS is AIX.

link|improve this question

0% accept rate
Which OS? I'm guessing Linux? – growse Mar 31 '11 at 14:15
feedback

4 Answers

for i in `lspv | awk '{print $1}'`
do
    echo $i
    lsattr -El -a size_in_mb $i
done

Or via ODM:

odmget -q"name like hdisk* and attribute=size_in_mb" CuAt
link|improve this answer
feedback

The following command will help you to find total size of each hdd on your system.

fdisk -l  | grep Disk
link|improve this answer
feedback

I know you didn't ask this directly but df -h lists created partition sizes which is sometimes more useful.

link|improve this answer
feedback

Not sitting in front of an AIX system, but try this:

df --total -h

Edit: this won't work in AIX. But I'll leave this here for anyone else who might need it on GNU systems.

link|improve this answer
2  
AIX commands don't support GNU like parameters. – Benoit Mar 31 '11 at 15:18
hmmmm .... I thought that was too easy ... – Joseph Kern Mar 31 '11 at 16:29
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.