My bash skills are lacking. I'm sorry. 
I'd like to run a cron every week that emails root a list of any large error_log files, perhaps over 50MB. The cause of the errors can be researched, to be more proactive in helping customers, and also may help save disk space (including backup space).
I've got this far... this script, when run as root from the command line, definitely does return a list of error_log files that are over 50MB:
I bet that can be improved.
The problem is that when I try that as a cron, it gives all sorts of errors. I've tried putting it into a shell script, and cron'ing the script, but same result.
Waiving white flag. Help, oh smart ones!
- Scott
I'd like to run a cron every week that emails root a list of any large error_log files, perhaps over 50MB. The cause of the errors can be researched, to be more proactive in helping customers, and also may help save disk space (including backup space).
I've got this far... this script, when run as root from the command line, definitely does return a list of error_log files that are over 50MB:
Code:
find /home/*/public_html/ -type f -iname error_log -size +50M -exec du -sh {} \;
The problem is that when I try that as a cron, it gives all sorts of errors. I've tried putting it into a shell script, and cron'ing the script, but same result.
Waiving white flag. Help, oh smart ones!
- Scott