The problem I found with these solutions is that they do not consider directory inheritance. Yes, you will find out how much “space” is under a specific directory. But if you want to know how much extra space a zone occupies, you need to go a different path. Do
zonecfg -z zonename info
where zonename is the name of the zone. Take a look at each line of inherit-pkg-dir.
inherit-pkgdir-dir:
dir: /lib
inherit-pkgdir-dir:
dir: /sbin
. ,
,
du -sh /zonepath/zonename
(/proc , , /tmp ), inherit-pkg-dir.
cd /zonepath/zonename/root
du -sh /bin /dev /etc /home /kernel opt /system /var etc....