From owner-freebsd-questions@FreeBSD.ORG Thu Jun 3 14:03:06 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 8000B1065675 for ; Thu, 3 Jun 2010 14:03:06 +0000 (UTC) (envelope-from illoai@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B96C8FC18 for ; Thu, 3 Jun 2010 14:03:05 +0000 (UTC) Received: by yxg6 with SMTP id 6so63682yxg.13 for ; Thu, 03 Jun 2010 07:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=336uEOFp/3T9qYd6QIxArYHjpJKUKSojbm5OhkOFTM0=; b=ZZ5BdEuVa7n5yDW+/WSGctKwQYrhKx04mn2wJP3qQ67B22z+mVQyWsVJnmigQHvWH2 RrBtklyq5BsliVVXRkJgkIjga1mERS+rPFSqZsZRa5z+OdJlsgWnNEOZ8CLIFKGaPBMX P6pJ9jCs8ZEn72fgQRYhmUuM1VRYbj+Roz5D8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=H/9bUvQNcZVXni6P7ayIgcX/p8XwWYauiqnPoKGOjZNUvwCimZNMTgFmifgC98joTP wPfEioyL5rmjEZYrTf+GzjizwK1w4oWAt0SeU4X4LcMJTMPVZ+0Y4EF6Nyr5o069vQqu bv8bgDY+DA4PXzpisEfbjUvBvrLSRrkcpSvEc= MIME-Version: 1.0 Received: by 10.91.182.18 with SMTP id j18mr4386254agp.116.1275573784439; Thu, 03 Jun 2010 07:03:04 -0700 (PDT) Received: by 10.90.84.19 with HTTP; Thu, 3 Jun 2010 07:03:04 -0700 (PDT) In-Reply-To: <20100603134212.f1b9b1c0.freebsd@edvax.de> References: <4C070621.5060109@comclark.com> <20100603134212.f1b9b1c0.freebsd@edvax.de> Date: Thu, 3 Jun 2010 10:03:04 -0400 Message-ID: From: "illoai@gmail.com" To: Polytropon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Aiza , "questions@freebsd.org" 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 14:03:06 -0000 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. > > =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 --