Date: Thu, 3 Jun 2010 10:03:04 -0400 From: "illoai@gmail.com" <illoai@gmail.com> To: Polytropon <freebsd@edvax.de> Cc: Aiza <aiza21@comclark.com>, "questions@freebsd.org" <questions@freebsd.org> Subject: Re: .sh & tar Message-ID: <AANLkTilbh89RNAsy_oqkNIichFiURPjwiuJOYyLcqq_z@mail.gmail.com> In-Reply-To: <20100603134212.f1b9b1c0.freebsd@edvax.de> References: <4C070621.5060109@comclark.com> <20100603134212.f1b9b1c0.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3 June 2010 07:42, Polytropon <freebsd@edvax.de> wrote: > On Thu, 03 Jun 2010 09:32:17 +0800, Aiza <aiza21@comclark.com> wrote: >> When I exec tar from within a .sh shell script I get this message >> tar: Removing leading '/' from member names >> I have tar outputting to > /dev/null and still get this message. >> With -v or without makes no difference. >> >> How can I stop this > > Depends on WHAT you want to stop - the illness or just its symptoms. :-) > > If it's just about symptoms, redirect the error messages into > nirvana. > > =A0 =A0 =A0 =A0tar [opts] [file] 1>/dev/null 2>&1 > > If you want to remove the REASON for "tar: Removing leading '/' > from member names", you need to re-create the archives and > start archiving from a relative point (instead of from an > absolute one), e. g. > > =A0 =A0 =A0 =A0# cd / > =A0 =A0 =A0 =A0# tar cvf etc.tar etc/ > > (lazy man's method) instead of > > =A0 =A0 =A0 =A0# tar cvf etc.tar /etc/ > > The extraction of the archive will usually start in the > current directory, so > > =A0 =A0 =A0 =A0# cd /usr/local/bin > =A0 =A0 =A0 =A0# tar xvf etc.tar > > won't give you an etc/ subtree in /usr/local/bin directory. > tar -cvf - ./ -C / > /dev/null ? --=20 --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTilbh89RNAsy_oqkNIichFiURPjwiuJOYyLcqq_z>