From owner-freebsd-questions@FreeBSD.ORG Thu Jun 3 11:42:16 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 1EEAA106564A for ; Thu, 3 Jun 2010 11:42:16 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id D53988FC1D for ; Thu, 3 Jun 2010 11:42:15 +0000 (UTC) Received: from r55.edvax.de (port-92-195-249-33.dynamic.qsc.de [92.195.249.33]) by mx02.qsc.de (Postfix) with ESMTP id 440861DEAA; Thu, 3 Jun 2010 13:42:13 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o53BgCqn001501; Thu, 3 Jun 2010 13:42:12 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 3 Jun 2010 13:42:12 +0200 From: Polytropon To: Aiza Message-Id: <20100603134212.f1b9b1c0.freebsd@edvax.de> In-Reply-To: <4C070621.5060109@comclark.com> References: <4C070621.5060109@comclark.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "questions@freebsd.org" Subject: Re: .sh & tar X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2010 11:42:16 -0000 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. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...