From owner-freebsd-questions Sun May 10 19:23:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA19803 for freebsd-questions-outgoing; Sun, 10 May 1998 19:23:00 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from hermes.iaccess.com.au (hermes.iaccess.com.au [203.5.74.7]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA19686 for ; Sun, 10 May 1998 19:21:44 -0700 (PDT) (envelope-from andrew@iaccess.com.au) Received: from alpine.iaccess (alpine.iaccess.com.au [203.5.74.227]) by hermes.iaccess.com.au (8.8.5/8.8.5) with SMTP id MAA06861; Mon, 11 May 1998 12:21:35 +1000 (EST) Message-ID: <02c001bd7c84$15e81320$e34a05cb@alpine.iaccess> From: "Andrew Specht" To: "Greg Lehey" , Subject: Re: gzip and date??? Date: Mon, 11 May 1998 12:25:37 +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 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG cool thanks... i just did that and it works :) Andrew Specht | System Administrator E-mail: andrew@iaccess.com.au | Internet Access Australia Internet: http://www.iaccess.com.au | Melbourne, Australia -----Original Message----- From: Greg Lehey To: Andrew Specht ; freebsd-questions@FreeBSD.ORG Date: Monday, May 11, 1998 12:17 PM Subject: Re: gzip and date??? >On Mon, 11 May 1998 at 11:50:48 +1000, Andrew Specht wrote: >> hey, >> >> Would anyone know how to make gzip include the date in the zipped file? >> >> eg: >> >> cache.log >> cache.log.gz.050598 >> >> does that work? nothing in the man pages about it. > >gzip doesn't do this. It also doesn't normally recognize this kind of >name as a gzip archive. There's nothing to stop you writing a >wrapper, though, like: > >#!/bin/sh >for i in $*; do > gzip $i > mv $i.gz $i.`date "+%d%m%y"`.gz >done > >This will rename the file in your example to cache.log.050598.gz. > >Greg >-- >See complete headers for address and phone numbers >finger grog@lemis.com for PGP public key > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message