These commands will also consider MySQL, email and public folders disk space for each user. Very useful when you need to migrate users or the whole server and you need to discard any disk space used by the operating system or backups:
echo "Users: " $(whmapi1 --output=jsonpretty get_current_users_count|grep users|grep -v count|cut -d ":" -f2)
echo "HDD used: " $(whmapi1 --output=jsonpretty get_disk_usage|grep blocks_used|awk '{print $3}'|tr -d ","|paste -sd+ - |bc|awk '{print $1/(1024^2) "GB"}')
