From owner-freebsd-current@FreeBSD.ORG Wed Sep 8 07:32:29 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF7B516A4CE; Wed, 8 Sep 2004 07:32:29 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FCA343D31; Wed, 8 Sep 2004 07:32:29 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.42 (FreeBSD)) id 1C4wwO-0000NN-GG; Wed, 08 Sep 2004 11:32:28 +0400 From: Vladimir Grebenschikov To: Tim Kientzle In-Reply-To: <413E9A11.8060804@freebsd.org> References: <1094482168.60927.9.camel@localhost> <413E9A11.8060804@freebsd.org> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Wed, 08 Sep 2004 11:32:28 +0400 Message-Id: <1094628748.1053.11.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 1.5.94.1FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: "current@freebsd.org" Subject: Re: bsdtar vs gnutar X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 07:32:30 -0000 =F7 =D7=D4, 07/09/2004 =D7 22:35 -0700, Tim Kientzle =D0=C9=DB=C5=D4: > Vladimir Grebenschikov wrote: > >=20 > > GNU tar has ability to show detailed info on extract in case when more > > then one 'v' letter specified like: > >=20 > > $ gtar -xvvzf arch.tar.gz > > -rwxrwxr-x ivan/ivan 268 Sep 6 16:40 2004 install > > $ tar -xvvzf arch.tar.gz > > x install >=20 > I'll look into this. Probably won't make it into 5.3, though. Ok, another issue, bsdtar shows archive type at the end of listing when -tvv specified, but gnu tar not shown: % tar tvvzf download/hcidump-1.5.tar.gz |& tail -n3 -rw-r--r-- 0 max max 8207 Aug 17 2003 hcidump/parser/sdp.h -rw-r--r-- 0 max max 3398 Feb 18 2004 hcidump/parser/hidp.c Archive Format: GNU tar format, Compression: gzip % gtar tvvzf download/hcidump-1.5.tar.gz | & tail -n3 -rw-r--r-- max/max 16065 Sep 13 03:38 2003 hcidump/parser/sdp.c -rw-r--r-- max/max 8207 Aug 17 02:05 2003 hcidump/parser/sdp.h -rw-r--r-- max/max 3398 Feb 18 01:33 2004 hcidump/parser/hidp.c % (Yes, know it is enough -tv to get such list, but I am always use -vv to get similar result in -t and -x cases) Archive information is not ls-like output at all: man tar ... -v Produce verbose output. In create and extract modes, tar will list each file name as it is read from or written to the archive. In list mode, tar will produce output similar to that of ls(1). Additional -v options will provide additional detail. ... May be move such, mostly debug, info to third -v to be compatible with gtar ? > > Another problem, gnu tar output -v output while extracting on stdout, > > but BSD tar output this on stderr ("tar -xvzf arch.tar.gz | head -n1" n= o > > longer work) >=20 > Not always. ;-) Sometimes gnutar outputs to stderr, > sometimes to stdout. POSIX.1-1997 clearly specifies > stderr. (Yet another place where gtar ignores the POSIX > standards... ;-/ >=20 > I suggest you try > tar -xvzf arch.tar.gz |& head -n1 > or > tar -xvzf arch.tar.gz 2>&1 | head -n1 >=20 > which will work correctly with either gtar or > bsdtar. Ok, I vote for POSIX compliance. > Cheers, >=20 > Tim Kientzle --=20 Vladimir B. Grebenchikov vova@fbsd.ru