Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : Linux : Education - Tutorials
LPI certification 102 exam prep, Part 1
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
3. Compiling applications from sources
  


bzip2 pipelines page 6 of 27


So, your version of tar doesn't recognize those handy bzip2 shortcuts -- what can be done? Fortunately, there's an easy way to extract the contents of bzip2 tarballs that will work on nearly all UNIX systems, even if the system in question happens to have a non-GNU version of tar. To view the contents of a bzip2 file, we can create a pipeline:

$ cat archive.tar.bz2 | bzip2 -d | tar tvf - | most

This next pipeline will actually extract the contents of archive.tar.bz2:

$ cat archive.tar.bz2 | bzip2 -d | tar xvf -

Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact