On Wed, 2009-11-25 at 23:28 -0500, Robert Citek wrote: > 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?
Not by email :) If I'm willing to go through some hoops, I can sudo apt-get install linpopup, tweak the system to start it up at login, take your script's output (as a .txt file), and: cat output.txt | smbclient -M shiny So long as I'm willing to always have linpopup minimized. Otherwise, if it's not running, it will store the messages but not display them. I can't assume there will be a terminal, so sending a message that way won't work, either. What would you suggest? I haven't really found any easy way to do this. Theresa -- 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
