From owner-freebsd-questions@FreeBSD.ORG Thu Jun 3 15:11:31 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06B38106567B for ; Thu, 3 Jun 2010 15:11:31 +0000 (UTC) (envelope-from sterling@camdensoftware.com) Received: from wh2.interactivevillages.com (wh2.interactivevillages.com [75.125.250.34]) by mx1.freebsd.org (Postfix) with ESMTP id C4C7F8FC16 for ; Thu, 3 Jun 2010 15:11:30 +0000 (UTC) Received: from 174-21-99-21.tukw.qwest.net ([174.21.99.21] helo=_HOSTNAME_) by wh2.interactivevillages.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OKBy5-0001HR-J7 for questions@freebsd.org; Thu, 03 Jun 2010 08:04:26 -0700 Received: by _HOSTNAME_ (sSMTP sendmail emulation); Thu, 03 Jun 2010 08:11:25 -0700 Date: Thu, 3 Jun 2010 08:11:25 -0700 From: Chip Camden To: "questions@freebsd.org" Message-ID: <20100603151125.GA44719@libertas.local.camdensoftware.com> Mail-Followup-To: "questions@freebsd.org" References: <4C070621.5060109@comclark.com> <20100603134212.f1b9b1c0.freebsd@edvax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i Company: Camden Software Consulting URL: http://camdensoftware.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wh2.interactivevillages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - camdensoftware.com Cc: Subject: Re: .sh & tar 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, 03 Jun 2010 15:11:31 -0000 On Jun 03 2010 10:03, illoai@gmail.com wrote: > On 3 June 2010 07:42, Polytropon wrote: > > On Thu, 03 Jun 2010 09:32:17 +0800, Aiza 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. > > > >        tar [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. > > > >        # cd / > >        # tar cvf etc.tar etc/ > > > > (lazy man's method) instead of > > > >        # tar cvf etc.tar /etc/ > > > > The extraction of the archive will usually start in the > > current directory, so > > > >        # cd /usr/local/bin > >        # tar xvf etc.tar > > > > won't give you an etc/ subtree in /usr/local/bin directory. > > > > tar -cvf - ./ -C / > /dev/null > ? > I can't help wondering why the 'v' option is being specified, unless /dev/null needs more playing time. -- Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com