I have to do some accounting on our backup servers to know what to bill customers for their space usage. I do this which is reasonably accurate for our needs chomp($kb = `zfs get -o value -Hp used $subdir` - `zfs get -r -o value -Hp usedbysnapshots $subdir | grep -v "-" | paste -sd+ - | bc`);