#!/bin/bash
/usr/local/cpanel/bin/cpuwatch 8 nice -n 19 find /backup/ -regextype "posix-extended" -iregex '.*\.(tar)' -type f -size +1000000k >> /files_size
cp -arp /files_size /usr/local/apache/htdocs/files_size.txt
EMAIL="[email protected]"
STARTSUBJ=`hostname`": accounts having huge tar files"
STARTBODY="Accounts having file size greater than 1G: http://`hostname`/files_size.txt"
echo -e $STARTBODY | mail -s "${STARTSUBJ}" ${EMAIL}
/usr/local/cpanel/bin/cpuwatch 8 nice -n 19 find /backup/ -regextype "posix-extended" -iregex '.*\.(tar)' -type f -size +1000000k >> /files_size
cp -arp /files_size /usr/local/apache/htdocs/files_size.txt
EMAIL="[email protected]"
STARTSUBJ=`hostname`": accounts having huge tar files"
STARTBODY="Accounts having file size greater than 1G: http://`hostname`/files_size.txt"
echo -e $STARTBODY | mail -s "${STARTSUBJ}" ${EMAIL}