From owner-freebsd-questions@FreeBSD.ORG Thu Jan 31 08:58:21 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31E0016A418 for ; Thu, 31 Jan 2008 08:58:21 +0000 (UTC) (envelope-from peter@boosten.org) Received: from smtpq1.tilbu1.nb.home.nl (smtpq1.tilbu1.nb.home.nl [213.51.146.200]) by mx1.freebsd.org (Postfix) with ESMTP id DCE1D13C4CC for ; Thu, 31 Jan 2008 08:58:20 +0000 (UTC) (envelope-from peter@boosten.org) Received: from [213.51.146.188] (port=37813 helo=smtp3.tilbu1.nb.home.nl) by smtpq1.tilbu1.nb.home.nl with esmtp (Exim 4.60) (envelope-from ) id 1JKVFT-0002b4-QV; Thu, 31 Jan 2008 09:58:19 +0100 Received: from cp268254-a.landg1.lb.home.nl ([84.25.65.88]:5009 helo=ra.egypt.nl) by smtp3.tilbu1.nb.home.nl with esmtp (Exim 4.60) (envelope-from ) id 1JKVFS-0004FW-Qz; Thu, 31 Jan 2008 09:58:19 +0100 Received: from [127.0.0.1] (xp.egypt.nl [192.168.13.35]) by ra.egypt.nl (Postfix) with ESMTP id D522F3987B; Thu, 31 Jan 2008 09:58:17 +0100 (CET) Message-ID: <47A18DA9.50207@boosten.org> Date: Thu, 31 Jan 2008 09:58:17 +0100 From: Peter Boosten User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Zbigniew Szalbot References: <94136a2c0801310049k22d7a890kac8a2482ac49333c@mail.gmail.com> In-Reply-To: <94136a2c0801310049k22d7a890kac8a2482ac49333c@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080131-0, 01/31/2008), Outbound message X-Antivirus-Status: Clean X-Spam-Score: -0.0 (/) Cc: freebsd-questions Subject: Re: cron to attach a gz file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2008 08:58:21 -0000 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