Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I get the total disk space available in Solaris 10?

  • I used iostat -En, but it is not showing the correct data.
  • df -h contains duplicate information.

Is there any generic way to find the total disk space in Solaris 10?

share|improve this question
iostat -En has no idea about how the disks are used (or not), it displays the whole device size. – jlliagre Aug 5 '13 at 5:59
Hi jlliagre, you are right, i have given it wrong. Correct command is df -k, But,it contains duplicate info. How to remove it and get exact disk space. – prasanna Aug 19 '13 at 9:30

3 Answers 3

You may use the -t <filesys> option of df, to limit its output to some types of file system, As an example, on my system df -h gives :

Filesystem      Size  Used Avail Use% Mounted on
rootfs           63G   19G   42G  31% /
/dev/sda3        63G   19G   42G  31% /
devtmpfs        2.0G     0  2.0G   0% /dev
tmpfs           2.0G  804K  2.0G   1% /run
shm             2.0G     0  2.0G   0% /dev/shm
cgroup_root      10M     0   10M   0% /sys/fs/cgroup
/dev/sda2        16G  4.0G   11G  27% /var
/dev/sda6       834G   52G  741G   7% /home

while df -h -t ext4 gives :

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        63G   19G   42G  31% /
/dev/sda2        16G  4.0G   11G  27% /var
/dev/sda6       834G   52G  741G   7% /home

If you want to sum over more than one type of partition, just add an other -t option, like :

df -h -t ext4 -t ext3 -t vfat
share|improve this answer

Use the df command to show the amount of free disk space on each mounted disk.

df -k  

Use the df -k command to display disk space information in Kbytes.

share|improve this answer
df -k command shows disk space in bytes, while summing up the size gives wrong data, since it lists every logical mount. The below command will not give the unique list, i need to get a unique mount list, so that, i can get the correct size df -k | awk 'NR>1' | awk '{x+=$2} END {print x}' – prasanna Aug 5 '13 at 6:32

Assuming that by duplicate information, you mean you are confused by df available space column reporting the same value for different ZFS file systems located in the same pool, I would suggest to use the zpool list command to get disk statistics similar to what df outputs for traditional file systems.


$ zpool list
zp    97.5G  46.0G  51,5G    47%  1.00x  ONLINE  -
share|improve this answer
Thanks for the command, it worked well in 5.11, will check in some other versions of solaris. – prasanna Aug 20 '13 at 5:28
This command definitely works with all versions of Solaris supporting ZFS and more generally with any OS supporting ZFS. – jlliagre Aug 20 '13 at 5:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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