On Wed, Nov 25, 2009 at 10:13 PM, Theresa Kehoe <[email protected]> wrote: > So Robert, if you're reading this thread, and if you're bored, how > *would* one go about writing a simple cron script to run once-daily, to > check the file size of every file in ~/.evolution/mail/local/ and give > the user a warning if any file is larger than 1.5GB?
Yup, reading thread. Nope, not bored, just need a break from other stuff. Cron job: $ crontab -l SHELL=/bin/bash # field allowed values # ----- -------------- # /----------- minute 0-59 # | /--------- hour 0-23 # | | /------- day of month 1-31 # | | | /----- month 1-12 (or names, see below) # | | | | /--- day of week 0-7 (0 or 7 is Sun, or use names) # | | | | | * * * * * date > /tmp/date.log Find files that exceed 1.5 GB in size: $ find /home/rwcitek/.evolution/mail/local/ -size +1500M -ls | head -1 | grep -q . && echo yes The question is, how do you want to be warned? Regards, - Robert -- Central West End Linux Users Group (via Google Groups) Main page: http://www.cwelug.org To post: [email protected] To subscribe: [email protected] To unsubscribe: [email protected] More options: http://groups.google.com/group/cwelug
