Unpacking .bz2

Ainsley Pereira lfs-discuss at executor.karoo.co.uk
Mon Jul 10 12:27:12 PDT 2000

In message <Pine.LNX.4.21.0007081121410.80-100000 at wolverine>
          Florin Boariu <florin at bnv-bamberg.de> wrote:

> I saw some patch on a hacker's homepage while I was browsing the net... I
> don't recall the URL, but try finding the hp of a person who calls
> himself "forcer".
> >
> > > Didn't one of the tar implementations have a command-line parameter for
> > > doing bzip2 (much like -z for gzip)?  I somehow remember doing 'tar -xvfi
> > > filename.tar.bz2' on a Slackware box (Slack 3.4 or so....)
> > 
> > The original GNU tar doesn't have bzip2 support via a flag (not last
> > time I checked and gnu tar hasn't been updated since last time I checked
> > so I don't think it'll be in there now, unless I overlooked it.
> > 
> > "info tar" - no string bzip found
> > tar --help | grep bzip - nothing found either

It's easy to add yourself - in tar.c there's a switch statement with
lots of 'case's for each option, pick a letter (I used 'I'), and add:

case 'I': set_use_compress_program_option("bzip2"); break;

somewhere in there. Also add the letter you used to the OPTION_STRING
#define near the top of that same file. (You can add other stuff, so
that it prints the option out if you do tar --help if you want, but I
leave that as an exercise for the reader ;-) )


   / Ainsley Pereira       /   aka Marble on Snowplains   /
  /                       / telnet://snowplains.org:3456 /
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list