From owner-freebsd-questions Wed Aug 21 14:16:47 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF74237B400 for ; Wed, 21 Aug 2002 14:16:43 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8F2543E42 for ; Wed, 21 Aug 2002 14:16:42 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk ([IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.5/8.12.5) with ESMTP id g7LLGXQI024245; Wed, 21 Aug 2002 22:16:33 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.5/8.12.5/Submit) id g7LLGSXn024244; Wed, 21 Aug 2002 22:16:28 +0100 (BST) Date: Wed, 21 Aug 2002 22:16:28 +0100 From: Matthew Seaman To: Philip Hallstrom Cc: MET , "'freebsd-questions-en'" Subject: Re: Forcing an Overwrite Message-ID: <20020821211628.GA24158@happy-idiot-talk.infracaninophi> References: <004201c24951$a6e6d700$6901a8c0@SURVIVAL> <20020821140754.H70939-100000@cypress.adhesivemedia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020821140754.H70939-100000@cypress.adhesivemedia.com> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Aug 21, 2002 at 02:08:16PM -0700, Philip Hallstrom wrote: > add "-f" to gzip. man gzip for more info. > > On Wed, 21 Aug 2002, MET wrote: > > > Here is my shell script: > > > > ====================================== > > > > #!/bin/sh > > > > DATE=`date +%m-%d-%Y`; > > ARCHIVED="MP_Site_Files-$DATE.tar"; > > > > cd /usr/local/webroot/; > > > > tar -cvf $ARCHIVED mp_stable; > > > > yes|gzip -9 $ARCHIVED; > > > > ====================================== > > > > Here is what I get spitted out. > > > > gzip: MP_Site_Files-08-21-2002.tar.gz already exists; not > > overwritten > > > > > > Any ideas on how to make it over-write without flaw? Try this: #!/bin/sh ARCHIVE="MP_Site_Files-$(date +%m-%d-%Y).tar.gz GZIP="-9" ; export GZIP tar -zcvf - mp_stable > $ARCHIVE Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message