From owner-freebsd-questions Sat May 12 8: 9: 1 2001 Delivered-To: freebsd-questions@freebsd.org Received: from bryden.apana.org.au (bryden.apana.org.au [203.3.126.129]) by hub.freebsd.org (Postfix) with ESMTP id 61A9037B43E for ; Sat, 12 May 2001 08:08:16 -0700 (PDT) (envelope-from dougy@brizzie.org) Received: from oracle (CPE-61-9-142-177.vic.bigpond.net.au [61.9.142.177]) by bryden.apana.org.au (8.9.3/8.9.3) with SMTP id BAA31976; Sun, 13 May 2001 01:06:54 +1000 (EST) (envelope-from dougy@brizzie.org) Message-ID: <00ba01c0daf5$55512d80$0300a8c0@oracle> From: "Doug Young" To: "G. Jason Middleton" , References: Subject: Re: how to email logs files Date: Sun, 13 May 2001 01:07:57 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > what is the easiest to have a log file such as /var/log/maillog emailed to > a specific email address daily? I know cron can do this but how would i > go about it in the crontab? hows about a script file that emails the log > to me and have cron run the script daily. Would this work? What kinda > syntax would be necessary for this? > The following is an extract from my notes about how I email ppp.log files Crontab To get a daily email of ppp.log, insert the following line in "/etc/crontab" 30 1 * * * root cat /var/log/ppp.log | mail -s "nightly" user@your_isp.com To get a weekly email etc etc 30 * 1 * * root cat /var/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message