1829119 Members
1979 Online
109986 Solutions
New Discussion

view a tarred bzip2 file

 
SOLVED
Go to solution
Ratzie
Super Advisor

view a tarred bzip2 file

what is the command to view a tarred bzip2 file?

file.tar.bz2
5 REPLIES 5
Martin P.J. Zinser
Honored Contributor

Re: view a tarred bzip2 file

bunzip2 file.tar.bz2
tar -xvf file.tar

This can certainly be crafted into a pipe ;-)

Greetings, Martin

P.S.If you do not have bzip2 check

http://www.digistar.com/bzip2/
Stuart Browne
Honored Contributor

Re: view a tarred bzip2 file

If you do have bzip2 installed, and a recent version of GNU tar (i.e. newer than 24 months old), you can use:

tar itvf file.tar.bz2

the 'i' flag is like the 'z' flag, but for 'bzip2' instead of 'gzip'.

Much fun..
One long-haired git at your service...
Ragu_1
Regular Advisor

Re: view a tarred bzip2 file

Adding to what Stuart said; if you have the console file manager `mc', open that up and bring the cursor to the bzipped file. Press Enter and you can view the contents of the bzipped file. You can get out from the `insides' of that file by manipulating the cursor keys. Midnight Commander is the `swiss army penknife' on the console.
Share and share alike
Tom Ward_1
Honored Contributor
Solution

Re: view a tarred bzip2 file

I normally use "tar jtvf file.tar.bz2"

Regards,
Tom
Stuart Browne
Honored Contributor

Re: view a tarred bzip2 file

ack!

My apologies.

Tom is right for the newer versions of tar.

There were 2 or 3 version however that used 'I' instead of 'j' (i.e. 1.13.17 as released with RH6.2).
One long-haired git at your service...