37

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?

55

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
  • 4
    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. – steeldriver Dec 9 '15 at 19:53
  • that is right, kinda missed that, but he can figure that out from man page:-) – ostendali Dec 10 '15 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.