56

I'm downloading an engine game file which is compressed as .tar.bz2.

I'm trying this command

tar -zxvf enginsxt.tar.bz2

And it throws an error. I know that command

tar -zxvf

is only for extracting .tar.gz files, but how can I decompress this one?

3
  • 5
    Possible duplicate of How do I install a .tar.gz (or .tar.bz2) file?
    – David
    Dec 9, 2015 at 18:05
  • 4
    tar xf enginsxt.tar.bz2 works well enough with anything tar-related, you don't really need to specify the compression used anymore; welcome to the 21st century!
    – cylgalad
    Dec 10, 2015 at 9:29
  • I tried this and it worked.
    – Kulasangar
    Oct 13, 2017 at 8:18

1 Answer 1

86

Have you checked the man page for tar?

Here is the part that I extracted from man page of tar for bz2:

-j, --bzip2
          filter the archive through bzip2

Remove -z from your options and (optionally) add -j to extract your tar archive correctly:

tar -xvjf enginsxt.tar.bz2
3
  • 5
    It still needs the f as the last option letter before the filename I think: either xvjf or plain xvf (or even xf if you don't care about verbosity) since tar is smart enough to figure out the compression type... except when wrong-footed with an erroneous type, as the OP did. Dec 9, 2015 at 19:53
  • that is right, kinda missed that, but he can figure that out from man page:-)
    – ostendali
    Dec 10, 2015 at 9:25
  • Out of all letters, how did they arrive to j?
    – Neinstein
    Jul 22, 2022 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .