Sh3ll



Directory :  /scripts2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Current File : //scripts2/find_accounts_with_many_files.sh
# /bin/bash

report_file='/tmp/report_file.txt'

for user in `ls /var/cpanel/users`; do quota -u $user | grep 'vda1'  | awk -v user=$user -F ' ' '{ if ($5>=1000000) print $5 " " user }' ; done | sort -n -r > $report_file
	
if [ -s $report_file ]; then 
	cat $report_file | mail -s "Reporte de cuentas con muchos archivos $HOSTNAME " sysadmin@sitioshispanos.com
fi

Sh3LL