List cPanel Users’ Disk Space Quotas & Usage

What does the current disk usage of your users look like? You could check cPanel, but I recommend using the shell as much as possible to save yourself time. This simple script will show you all the information you need to see how your users are utilizing their allotted disk space.

awk '$2 !~ /nobody/ {print $2}' /etc/userdomains | sort -u | while read USROUT; do quota -v -u $USROUT; done

If you notice this one liner script users awk with regex to skip the nobody user and pull all the other usernames out of the userdomains file. You could also use a grep -v in a pipe, I was just being fancy.

This entry was posted in cPanel Guides. Bookmark the permalink.

Leave a Reply