Script to list Domain Disk Usage in Plesk

One of my customer want to know the disk space usage for all of his domains in Plesk. Please find the script that I used in this situation.

Script to list Domain Disk Usage in Plesk

if [ -d /var/www/vhosts ]; then echo -ne "nn=== WEBSITES ===n"; cd /var/www/vhosts && du -ks --exclude='chroot' --exclude='default' * | sort -nr | cut -f2 | xargs du -sh; echo "[`ls --ignore='chroot' --ignore='default' | wc -l` Sites - Total `du -hs . | cut -f1`]"; fi;

Fell free to modify.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here