Date: Wed, 21 Aug 2002 22:16:28 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Philip Hallstrom <philip@adhesivemedia.com> Cc: MET <met@uberstats.com>, "'freebsd-questions-en'" <freebsd-questions@FreeBSD.ORG> Subject: Re: Forcing an Overwrite Message-ID: <20020821211628.GA24158@happy-idiot-talk.infracaninophi> In-Reply-To: <20020821140754.H70939-100000@cypress.adhesivemedia.com> References: <004201c24951$a6e6d700$6901a8c0@SURVIVAL> <20020821140754.H70939-100000@cypress.adhesivemedia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020821211628.GA24158>
