Re: cron to attach a gz file



Zbigniew Szalbot wrote:
Hello,

I know I can use

mail -s "logfile " < /var/log/httpd_access.log

in cron to email the content of a log file to a particular email
address but how do I make that log file a binary attachment (*.gz)?

gzip -c /var/log/httpd_access.log | uuencode httpd_access.log.gz | mail -s "logfile" someone@somewhere

Peter
--
http://www.boosten.org
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Emailing a file attachment w/ cron
    ... > I'm using FC1 and I need to email a log file with cron. ... > send but send takes the logfile and makes it the body of the email. ...
    (Fedora)
  • Emailing a file attachment w/ cron
    ... I'm using FC1 and I need to email a log file with cron. ... send but send takes the logfile and makes it the body of the email. ... Outgoing mail is certified Virus Free. ...
    (Fedora)
  • Re: my log files-is there any problem
    ... > Here is my log file which is generated by Logwatch. ... > Unknown Entries: ... Those arise from cron jobs being run. ... > I am little concerned with these 2 means are these the normal entries ...
    (Fedora)
  • Re: question about cron
    ... If you don't see the command execute in the log file, ... My understanding is that cron should be able to re-read the crontab file on the fly, but, but just in case, you may need to do that. ... I use cron to do system backups and to rotate those backups. ...
    (RedHat)
  • Re: lwp-download http://..--how do I use it to download pages?
    ... putting it in a batch file; however, I would like to create a log file ... the job under cron in my account and anything it outputs will be emailed ... Is there a way for Perl, ...
    (comp.lang.perl.modules)