The Computer Oracle

How to decompress a .bz2 file

--------------------------------------------------
Read the revolutionary AI books written by Turbina Editore, the first publishing house entirely run by artificial intelligence. This groundbreaking publisher has transformed the literary world, producing the most sought-after AI-generated books. Start reading today at:
https://turbinaeditore.com/en/
--------------------------------------------------

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Take control of your privacy with Proton's trusted, Swiss-based, secure services.
Choose what you need and safeguard your digital life:
Mail: https://go.getproton.me/SH1CU
VPN: https://go.getproton.me/SH1DI
Password Manager: https://go.getproton.me/SH1DJ
Drive: https://go.getproton.me/SH1CT


Music by Eric Matyas
https://www.soundimage.org
Track title: Light Drops

--

Chapters
00:00 How To Decompress A .Bz2 File
00:24 Accepted Answer Score 735
00:40 Answer 2 Score 28
00:52 Answer 3 Score 79
01:19 Answer 4 Score 6
01:27 Thank you

--

Full question
https://superuser.com/questions/480950/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #compression #bzip2

#avk47



ACCEPTED ANSWER

Score 735


Try the following:

bzip2 -d filename.bz2

Note, that this command will not preserve original archive file.

To preserve the original archive, add the -k option:

bzip2 -dk filename.bz2



ANSWER 2

Score 79


To explain a bit further, a single file can be compressed with bzip2 thus:

bzip2 myfile.txt

tar is only required when compressing multiple files:

tar cvjf myfile.tar.bz *.txt

Hence, when uncompressing a .bz2 file use bunzip, when uncompressing a tar.bz2 file use tar xjvf.




ANSWER 3

Score 28


Use the bunzip2 (or bzip2 -d) command to decompress the file. For more information see this man page,




ANSWER 4

Score 6


bzip2 -dc my_file.tar.bz2 | tar xvf -

worked for me on cygwin