Why I can't uncompress a .bz2 file using tar?

You can't use the tar command because the archive isn't a .tar.* file. To uncompress a bzip2 file, use the following command (this won't preserve the original .bz2 file):

bzip2 -d enwiki-latest-pages-articles.xml.bz2

If you want to extract it and keep the original, run this command:

bzip2 -dk enwiki-latest-pages-articles.xml.bz2

Source: https://superuser.com/questions/480950/how-to-decompress-a-bz2-file


Just use bunzip2:

bunzip2 enwiki-latest-pages-articles.xml.bz2

And if its a gzip commpressed file:

gunzip enwiki-latest-pages-articles.xml.gz