how can i get hard disk usage

I want to get hard disk usage

hard disk usage= already allocated/total allocated

first I use ioscan -kfnC disk get disk name c#t#d#

then I use diskinfo /dev/rdsk/c#t#d#
but this command can only get total disk size,not disk usage

has any command can get that

thanks:)

have a look at "df and "du". read the manpages for more infos on how to use these commands.

ioscan will tell you what disks are connected and diskinfo what they are..

what do you call disk usage? Are you in LVM?
If so are you wondering if you have some spare unused lv extents because there is difference between disk size and what you see with bdf?
Many cases:
1 - Swap: will not show up with bdf, df, du, but with swapinfo
2 - Unmounted FS or unused FS...
3 - Mirroring...
4 - Yes not all disk space is used

in this case free PP can be seen with vgdisplay /dev/<VGname>
man vgdisplay lvdisplay pvdisplay swapinfo

All the best