Saturday, May 4, 2024
77
rated 0 times [  77] [ 0]  / answers: 1 / hits: 55592  / 3 Years ago, sat, june 5, 2021, 5:19:46

So I have this wikipedia dump sized at about 10gb and named as "enwiki-latest-pages-articles.xml.bz2".
I have been trying the following commands in the terminal to unzip the dump:



tar jxf enwiki-latest-pages-articles.xml.bz2


And



tar xvf enwiki-latest-pages-articles.xml.bz2


But both of them returns the following error



tar: This does not look like a tar archive
tar: Skipping to next header

More From » command-line

 Answers
5

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


[#20804] Monday, June 7, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
motivengry

Total Points: 459
Total Questions: 112
Total Answers: 108

Location: Bonaire
Member since Sat, May 1, 2021
3 Years ago
;