Questions tagged [bzip2]

Use bzip2 for questions about the files compressed with bzip2.

Bzip2 is a compressor (like arj, lha and zip).

40 questions
553
votes
7 answers

How to decompress a .bz2 file

I have a file called filename.bz2 that I need to decompress. I have tried the command tar xvjf filename.tar.bz2, but it didn't work as the file is not a tar file. How do I decompress this file?
Jury A
  • 5,675
181
votes
7 answers

How to password protect gzip files on the command line?

I want to create some tar.gz (and possibly tar.bz2) files, using the tar command on Ubuntu 10.04. I want to password protect the file. What is the command to do this (I have Googled, but found nothing that shows how to create and extract compressed…
morpheous
  • 4,463
161
votes
7 answers

Pros and cons of bzip vs gzip?

I've known gzip for years, recently I saw bzip being used at work. Are they basically equivalent, or are there significant pros and cons to one of them over the other?
ripper234
  • 11,903
49
votes
6 answers

What is the difference between TAR vs CPIO archive file formats?

I am curious and did a bit of reading but still have questions. What makes CPIO different than TAR? I was told in another question that tar is for pulling together many files into 1 archive which then is usually gzip'd or bzip'd. Also I was told TAR…
46
votes
3 answers

Is there a way to determine the decompressed size of a .bz2 file?

Is there a way to print the decompressed size of a .bz2 file without actually decompressing the entire thing?
endolith
  • 7,704
38
votes
6 answers

Between xz, gzip, and bzip2, which compression algorithim is the most efficient?

Between xz, gzip, and bzip2, which compression algorithm gives the smallest file size and fastest speed when compressing fairly large tarballs?
Nathan2055
  • 1,430
19
votes
7 answers

Which archiving method is better for compressing text files on Linux?

In my application I need do compress of logs that are text files. Seems that bzip2 and gzip have the same compression ratio. Is that correct?
16
votes
5 answers

Is there a way to mount a file.tar.bz2 without extracting it onto the filesystem?

Is there a way to mount a file.tar.bz2 without extracting it onto the filesystem? I don't care if the mount is read only. Hopefully your answer will also apply to file.tar.gz. "mount" in this context is meant to be akin to mounting an ISO file.
GlassGhost
  • 1,279
13
votes
3 answers

How do I convert tar.bz2 to tar.gz?

I'm new in Linux, is this conversion possible? Do I need to compress and decompress all content?
9
votes
4 answers

Uncompress bz2 file from command line on Windows

Is there any tool in the Windows command line that allows me to do this? Otherwise, is there any light and portable application that will allow me to? Related question, can I rename .bz2 extension to .zip? Seems to work for WinRar.
7
votes
3 answers

Extracting a *.tar.bz2 file?

I always used to use this command to extract files from a bzip2 tar ball: tar xjvf file.tar.bz2 But right now on Ubuntu 14.04, I get this error: tar: Conflicting compression options Try 'tar --help' or 'tar --usage' for more information. Did…
7
votes
0 answers

What is the etymology behind "-j" indicating bzip2 for tar?

What is the etymology behind "-j" indicating bzip2 for tar?
7
votes
3 answers

Use tar vs bzip2 for creating a .tar.bz2 archive?

I just read that tar can create .tar.bz2 files. All this while, I was using tar + bzip2 to do this. I was wondering if there was a difference between using tar to create the archive vs using bzip2? Also, why have 2 things which does the same…
5
votes
2 answers

Linux - Is there a way to convert .bz2 files to .tar.bz2 files using pipes?

Is there a way to convert a .bz2 file to a .tar.bz2 file without decompressing the entire thing to disk and then re-compressing? The decompressed size is larger than my drive. Since bz2 operates on blocks, it would seem like you could just…
endolith
  • 7,704
4
votes
1 answer

tar/bz2 compress a file removing uncompressed original

Is there any way to turn a directory called dir1 into dir1.tar.bz2 without keeping the original? I need to save space and want to compress some large files but don't have enough room to keep a compressed copy and the original. Is there any way to…
1
2 3