From owner-freebsd-questions@FreeBSD.ORG Sun Mar 9 23:20:36 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D22B9106566B for ; Sun, 9 Mar 2008 23:20:36 +0000 (UTC) (envelope-from danny@ricin.com) Received: from smtpq2.tilbu1.nb.home.nl (smtpq2.tilbu1.nb.home.nl [213.51.146.201]) by mx1.freebsd.org (Postfix) with ESMTP id 6D9768FC24 for ; Sun, 9 Mar 2008 23:20:36 +0000 (UTC) (envelope-from danny@ricin.com) Received: from [213.51.146.190] (port=33420 helo=smtp1.tilbu1.nb.home.nl) by smtpq2.tilbu1.nb.home.nl with esmtp (Exim 4.60) (envelope-from ) id 1JYUok-0005B7-Lt for freebsd-questions@freebsd.org; Mon, 10 Mar 2008 00:20:34 +0100 Received: from cp1228410-a.dbsch1.nb.home.nl ([84.27.217.164]:62272 helo=desktop.homenet) by smtp1.tilbu1.nb.home.nl with smtp (Exim 4.60) (envelope-from ) id 1JYUoj-0006UT-QN for freebsd-questions@freebsd.org; Mon, 10 Mar 2008 00:20:34 +0100 Received: by desktop.homenet (sSMTP sendmail emulation); Mon, 10 Mar 2008 00:19:33 +0100 From: "Danny Pansters" To: freebsd-questions@freebsd.org Date: Mon, 10 Mar 2008 00:19:33 +0100 User-Agent: KMail/1.9.7 References: <47D46A4B.6050409@mkdev.eu> In-Reply-To: <47D46A4B.6050409@mkdev.eu> X-Face: (Zs+'ncTcchkOX|~t6{?Iii=O!G#WEK!+OD0|-F=i%1pvP5V_Sz4PaJC8o)=?utf-8?q?MiSnH/JMJFy=0A=09oBN-My?=, v":S7, (=?utf-8?q?mmkPm=27U=7BMgT+eM=2EBd=5Cp/P!dr=5DhOTXqpse21O!=25Ct=60SE=2EOodq?= =?utf-8?q?=5Dry=5E=23kU=5E=0A=09-?=GT.[8D}i$6P>=" =?utf-8?q?=23=0A=09*J+4d=7E?= MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803100019.33200.danny@ricin.com> X-Spam-Score: 0.0 (/) Subject: Re: tar( bzip2 parts of manpage ) 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: Sun, 09 Mar 2008 23:20:36 -0000 On Sunday 09 March 2008 23:52:59 Markus Klaschka wrote: > Hi, > I never used built-in bzip functionality of tar, but I like bzip2 more > than gzip, so I just searched and found following: > -j (c mode only) Compress the resulting archive with bzip2(1). > In extract or list modes, this option is ignored. Note that, unlike > other tar implementations, this implementation recognizes > bzip2 compression automatically when reading archives. > and > -y (c mode only) Compress the resulting archive with bzip2(1). > In extract or list modes, this option is ignored. Note that, unlike > other tar implementations, this implementation recognizes > bzip2 compression automatically when reading archives. > > what's going on there? > > I tested the -j option, works good. I created a file.tar.bz2 and like > the manpage describes, tar -cvf is enough to unpack the tarball, you mean tar xvf > Is that a FreeBSD feature, how is it on other platforms? > Is bzip2 used, or is that build in as a tar? bsdtar != gtar In bsdtar -j (-y) indeed uses bzip2 to compress rather than gzip and upon unpacking it handles both tgz and tbz transparantly that's why you don't need to specify -j there (different from gtar IIRC). I think -j and -y are mainly there to be compatible with gtar but I'm not sure. Note that both bsdtar and bzip2 are in base and have been for a while so it seems like a logical feature for bsdtar. Knowing whether its a gzip or bzip2 compressed is easy to see from magic numbers. Cheers, Dan > > Cheers > > - > Markus Klaschka > MKDev - Markus Klaschka Development > http://www.mkdev.eu > > Spain: 0034 - 63 747 23 07 > UK: > 0044 - 750 910 2718 > Mail: mk@mkdev.eu > Skype: mark-use > IRC: mark-use @ irc.freenode.net : #freebsd, ##security, #freebsd-src, > #bsdforen.de, #bsdgroup.de