how to uncompress .bz2 archives

Timothy A. Seufert yellowdog-general@lists.terrasoftsolutions.com
Fri Sep 13 19:09:01 2002


At 8:22 PM -0400 9/13/02, Michael George wrote:
>On Friday, September 13, 2002, at 07:20  PM, Ladislav Bodnar wrote:
>
>>  On Saturday 14 September 2002 04:04, Michael George wrote:
>>>  On Friday, September 13, 2002, at 03:31  PM, Olivier Reisch wrote:
>>>>  On Friday 13 September 2002 15:59, hotFusion wrote:
>>>>>  This may sound like a stupid question but I cannot figure out how to
>>>>>  decompress any files with the .bz2 extension.
>>>>
>>>>  If it's a .tar.bz2, you can also use "tar -xvjf file.tar.bz2"
>>>
>>>  You can?  I just tried that today and tar complained that the "j"
>>>  option is unknown.  Is there a secret update for it somewhere, or did
>>>  you build the GNU tar for your system?
>>
>>  Then try "tar xvyf file.tar.bz2". See if this works.
>
>Oops, my bad.  I was thinking this was my darwin list, not yellow dog...
>the "j" option works in linux...

On topic, though, in that it touches on one of the problems with 
moving between various UNIXen -- there are differing implementations 
of some of the tools.  Linux distributions typically use GNU Tar 
while BSD derived systems use a BSD version of tar.  There are 
undoubtedly other implementations out there too.  (wouldn't be 
surprised if SysV variants have their own branch off the tar family 
tree, for example...)

-y is a new one to me, but for a while GNU Tar used -I for bzip2, so 
that's another switch to try if you're ever on a box which you think 
may have a less than current version.  -j seems to be GNU tar's final 
and permanent choice for a bzip2 switch.

BTW, Darwin actually comes with both BSD and GNU tar.  The GNU 
version is installed as 'gnutar'.
-- 
Tim Seufert