FreeBSD question: I need to to extract th file with extension .tar.bz2

Hi experts,
I need to  to extract this file "gcc-core-3.4.2.tar.bz2" .  Its the total GNU package that contains all the compilers.
This contains gcj,  the gnu java compiler.
What command do i need to do so exactly. The o/s is FreeBSD.

Thks

parvindergAsked:
Who is Participating?
 
yuzhCommented:
You need to use "bunzip2" to uncompress the file and then untar it:

eg:
bunzip2 -c /path-to/gcc-core-3.4.2.tar.bz2 | tar -xvf -

If you don't have bunzip2, you need to get it from:
http://sources.redhat.com/bzip2/
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Have you tried

tar -xvjf gcc-core-3.4.2.tar.bz2
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
0
 
Matt_AveryCommented:

If your copy of "tar" is a fairly modern version of GNU tar, it will likely have  builtin support for *.bz2 compressed files, so leew's answer ("tar -xvjf gcc-core-3.4.2.tar.bz2") is the easiest one.

If your version of "tar" doesn't recognise the "-j" option, yuzh's answer should still work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.