Nk_domain_disk_usage
Description
Get disk usage stats for every domain
Example
[root@cloudvpsserver ~]# nk_domain_disk_usage Domain │ Docroot │ Disk-Usage Quota │ nkern │ /home/nkern/public_html │ 1.3M none │
Code
nk_domain_disk_usage() { gen_domain_disk_body() { echo "Domain │ Docroot │ Disk-Usage Quota │" for domain in $(nk_list_all_domains); do user="$(nk_user $domain)" docroot="$(nk_docroot $domain)" disk_usage="$(du -hs "$docroot" | awk '{print $1}')" quota="$(quota "$user" | awk '{print $NF}')" echo "$user │ $docroot │ $disk_usage $quota │" done | sort -rh -k 5 } gen_domain_disk_body | column -t }