Mini Shell

Direktori : /proc/self/root/opt/sharedrads/
Upload File :
Current File : //proc/self/root/opt/sharedrads/check_size

#!/bin/bash

### calculate account size ###
if [[ $1 != "" ]]; then
acct=$1
echo "Quota check shows the following: `quota $acct | awk '{ print
($2*1024)/1048576 }' | grep -v -P '^0$'`"
echo "Cpanel's Cache Data for $acct `cat /var/cpanel/repquota.cache|grep $acct |awk '{print $3/(1048576/1000)"M"}'`"
echo "Database Information:"
diff -y <(ls -d /var/lib/mysql/`echo -n $acct`_*/ | cut -d'/' -f5) <(du -h /var/lib/mysql/`echo -n $acct`_*/)

else
echo "Usage is: check_size accountname"
fi

Zerion Mini Shell 1.0