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.


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

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:
Lee W, MVPTechnology and Business Process AdvisorCommented:
Have you tried

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

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.
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.