Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I untar/unzip a .tar.bz2 file?

9,724 views
Skip to first unread message

laredotornado

unread,
May 13, 2011, 1:39:14 PM5/13/11
to
Hi,

I'm using SOlaris 10. How do I extract the file hidden within
a .tar.bz2 archive?

Thanks, - Dave

cindy

unread,
May 13, 2011, 1:49:14 PM5/13/11
to

I think you want bunzip2:

# bunzip2
bunzip2: I won't read compressed data from a terminal.
bunzip2: For help, type: `bunzip2 --help'.
# man bunzip2
Reformatting page. Please Wait... done

User Commands bzip2(1)

NAME
bzip2, bunzip2 - a block-sorting file compressor, v1.0.6
bzcat - decompresses files to stdout
bzip2recover - recovers data from damaged bzip2 files

SYNOPSIS
bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ... ]
bunzip2 [ -fkvsVL ] [ filenames ... ]
bzcat [ -s ] [ filenames ... ]
bzip2recover filename

Thanks,

Cindy

Chris Ridd

unread,
May 13, 2011, 1:49:45 PM5/13/11
to
On 2011-05-13 18:39:14 +0100, laredotornado said:

> Hi,
>
> I'm using SOlaris 10. How do I extract the file hidden within
> a .tar.bz2 archive?

bunzip2 < foo.tar.bz2 | tar xfv -

--
Chris

laredotornado

unread,
May 13, 2011, 2:21:58 PM5/13/11
to

Thanks for this command but I got an error ...

# bunzip2 < vim-7.3.tar.bz2 | tar xfv
tar: tarfile must be specified with 'f' function modifier
Usage: tar {c|r|t|u|x}[BDeEFhilmnopPqTvw@[0-7]][bfk][X...] [blocksize]
[tarfile] [size] [exclude-file...] {file | -I include-file | -C
directory file}...

- Dave

Chris Ridd

unread,
May 13, 2011, 2:39:46 PM5/13/11
to

You forgot the "-" argument from the end of my commandline.

--
Chris

Oscar del Rio

unread,
May 13, 2011, 3:01:01 PM5/13/11
to
On 05/13/11 01:39 PM, laredotornado wrote:
> I'm using SOlaris 10. How do I extract the file hidden within
> a .tar.bz2 archive?

You can also use gtar (usually in /usr/sfw/bin/gtar)

gtar jxvf filename.tar.bz2

mangesh...@sumasoft.net

unread,
Nov 19, 2012, 1:49:22 AM11/19/12
to
Its works.

Thanks

--



Confidentiality Note: This e-mail message and any attachments to it are
intended only for the named recipients and may contain legally privileged
and/or confidential information. If you are not one of the intended recipients,
please forward this mail to ab...@sumasoft.net and do not duplicate or
forward this e-mail message and immediately delete it from your computer.

dksin...@gmail.com

unread,
Apr 17, 2013, 4:00:36 AM4/17/13
to
thanku yarr
0 new messages