PDA

View Full Version : tar.bz2 unzipping



phil.b
28-11-2004, 10:19 PM
Is there a command to unzip & untar a filename.tar.bz2 file. I've tried tar -xvfj filename.tar.bz2 & it doesn't work. I've been bunzip2 filename.bz2 then tar -xvf filname.tar to de-compress.

Phil

Spacemannz
28-11-2004, 10:25 PM
Winzip does TZ and Tar. Have u tried that

beama
28-11-2004, 10:32 PM
> Is there a command to unzip & untar a
> filename.tar.bz2 file. I've tried tar -xvfj
tar -xjvf filename.tar.bz2 note the position of j

>I've been bunzip2
> filename.bz2 then tar -xvf filname.tar to
bunzip2 filename.tar.bz2

Wood-Chuck
28-11-2004, 10:32 PM
Winzip doesn't run under Linux.

To unzip a bzip'd file:
bunzip2 filename.tar.bz2
tar -xvf filename.tar

phil.b
28-11-2004, 10:41 PM
Thanks beama.

Graham L
29-11-2004, 02:44 PM
Your original tar command would have worked, except ... :D

The f must be the last option ... it means "use the next thing in this command line as the filename". You probably didn't have a file called "j" in that directory. ;-)

So, tar xvjf filename.tar.bz2 is what you wanted. (tar doesn't insist on the "-' before the option string ... that's a bit historic, and probably not POSIX-conformant. ]:) )

You could probably do tar -x -v -f filename.tar.bz2 -j , but that gets a bit long-winded.