Questions tagged [bzip2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
79 views

using bzip gzip zip in bash

#!/bin/bash # check if the user put a file name if [ $# -gt 0 ]; then # check if the file is exist in the current directory if [ -f "$1" ]; then # check if the file is ...
user avatar
  • 1
1 vote
1 answer
821 views

php build error: please reinstall BZip2 distribution

I tried to build PHP v8.0.0 from its source but after running ./configure it says: ... checking for BZip2... not found configure: error: please reinstall BZip2 distribution But I have bzip2 installed ...
user avatar
  • 129
0 votes
0 answers
71 views

Compression vs. redundancy: do they cancel each other out?

Does it make sense to compress a tarball (or any kind of file, really), e.g., using gzip or bzip2, while at the same time creating redundancy files for it, e.g., a par2 file? The context is that I am ...
user avatar
1 vote
2 answers
392 views

Check tar file for errors

If there any way to see if there is a problem with the .tar.bz2 file? As you can see, I can get a list of files, but neither xjvf nor xzvf works in this case. $ tar tf pytorch.20210702.tar.bz2 | head ...
user avatar
  • 1,015
0 votes
1 answer
2k views

tar (child): : Cannot open: Is a directory

I know thats a pretty dumb question but I didn't found this precise question on internet I try to tar -cvjf all the contents of a directory (/*) and directly redirect that to a file (> file) but ...
user avatar
  • 109
7 votes
1 answer
995 views

Is there a compression tool with an arbitrarily large dictionary?

I am looking for a compression tool with an arbitrarily large dictionary (and "block size"). Let me explain by way of examples. First let us create 32MB random data and then concatenate it to itself ...
user avatar
  • 323
7 votes
2 answers
3k views

bzip2: Check file's decompressed size without actually decompressing it

I have a big bzip2 compressed file and I need to check it's decompressed size without actually decompressing it (similar to gzip -l file.gz or xz -l file.xz). How can this be done using bzip2?
user avatar
  • 2,301
2 votes
3 answers
420 views

Difference between .bz2 and .tar.bz2 files

I am supposed to find whether a file is compressed using .bz2 or .tar.bz2(without using extension of file) and and decompress it accordingly. I used the file command but it is giving same result for ...
user avatar
7 votes
1 answer
469 views

Can files compressed with bzip2 be relied upon to be deterministic (reproducible)?

I am trying to determine if there are any potential issues using bzip2 to compress files that need to be 100% reproducible. Specifically: can metadata (name / inode, lastmod date, etc) or anything ...
user avatar
0 votes
2 answers
63 views

Copying files, verifying and then zipping with a shell script

I am looking to create a script - a linux or a python scrip so that it can create the following things for me as well as Verify the files for me which are copied from a folder. I Have two folders: ...
user avatar
  • 51
2 votes
2 answers
3k views

BZIP2 multiple files without losing original files

I want to bzip2 about 1000 files. However, I am tasked to not remove the old files and leave both the original and its bz2 file in the same folder. What is the quickest way to do this. Just to ...
user avatar
  • 51
-2 votes
1 answer
3k views

bzip2 a tar folder

I just create a tar directory of 600G test.tar inside dir1 . my question the only space available I have now 300G in dir1 I m looking for some ways to generate the compressed test.tar.bzip on the ...
user avatar
  • 71
1 vote
1 answer
144 views

How do you extract certain information from bzip2 -v?

Suppose I have a file called index.html and I want to compress it and display the compression size of it. Well I would do this... bzip2 index.html -v Now that gives me all of the data bits/bytes, ...
user avatar
  • 13
1 vote
1 answer
578 views

On Solaris; find, append to a tar ball and compress question

Solaris 11 I want to find all files greater that 31 days, tar them and compress the tar file. I'd like to do this on one line. I'd rather use pbzip2 than gzip!!! Here is what I tried as a ...
user avatar
  • 288
1 vote
1 answer
1k views

Are bz files different from bz2 and how to make bz files instead of bz2?

Are bz files different from .bz2? I'm guessing bz2 is the successor of bz and perhaps they use different compression algorithms or are they essentially suffixes of filenames that mean the same thing? ...
user avatar
  • 854
1 vote
1 answer
78 views

Compiling bzip1 on a raspberry pi 2 with debian server?

I've stumbled across the discontinued bzip-0.21 on the ftp of vim.org which is respectable, so I think it's fine. However the code from 1996 won't compile anymore with today's GCC. Is there a chance ...
user avatar
  • 21
1 vote
1 answer
705 views

bzip2 decompression, changes and compression of a text file through the pipeline

I am searching for a way to decompress a bzip2 compressed text file, change the content (adding new content, sorting etc.) and compress it again through pipelines. I already found a way to do this ...
user avatar
  • 225
0 votes
1 answer
152 views

poor mans backup with find and parallel compression

I'm planning to backup the /home folder of my Kubuntu box to an external drive. In order to speed up the process I consider zipping large files (individually) so that writing them is faster. I also ...
user avatar
4 votes
1 answer
3k views

Can I somehow update compressed archives?

I'm trying to find all files with given extension but I'm getting this error: tar: Cannot update compressed archives Try 'tar --help' or 'tar --usage' for more information. tar: Cannot update ...
user avatar
  • 239
17 votes
5 answers
26k views

Compress a large number of large files fast

I have about 200 GB of log data generated daily, distributed among about 150 different log files. I have a script that moves the files to a temporary location and does a tar-bz2 on the temporary ...
user avatar
  • 312
2 votes
2 answers
6k views

Getting list of corrupted file from folder and its sub folder

I have following directory structure folder └── 01 ├── test1 └── abc.bz2 └── asd.bz2 ├── test2 └── 546.bz2 └── alsj.bz2 ├── test3 └── aewr.bz2 ...
user avatar
  • 12.5k
1 vote
1 answer
1k views

tar in parallel [duplicate]

I have a directory with several hundred sub-directories. I want to tar and compress each sub-directory and name the resulting file <currentDirName>.tar.bz2. I have done: find ./dir -type f -...
user avatar
2 votes
3 answers
6k views

tar append to file in archive

Good morning, I have a tar compressed archive tar.bzip2 (created using tar jcf), which contains a file named data.txt (1). On the other side, I have another file also named data.txt (2). Is ...
user avatar
  • 1,025
3 votes
2 answers
5k views

tar exits with bzip2: (stdin): trailing garbage after EOF ignored after extract

I have extracted a large (3.9GB) tar.bz2 file using the following command: tar -xjvf archive.tar.bz2 The extract proceeds fines but exits printing: bzip2: (stdin): trailing garbage after EOF ...
user avatar
  • 133
3 votes
1 answer
5k views

Using bzgrep recursively

I wanted to use bzgrep to find to text in bzip2 files. I expected bzgrep to work as grep, but on bz2 files. So I tried bzgrep -r "mypattern" . to find text in my bz2 files. Instead of the ...
user avatar
6 votes
2 answers
25k views

How to extract a single file from tbz

I have the following archived directory: itunes20140618.tbz I want to extract single file from it called: itunes20140618/video How would I do this? So far, I am doing $ bzip2 -d /tmp/...
user avatar
  • 319
40 votes
1 answer
3k views

What happened to bzip1?

bzip2 had been a de facto standard for quite strong compression throughout many years already. I myself had typed the bzip2 command thousands of times so far, which makes me wonder - what happened to ...
user avatar
  • 1,340
1 vote
2 answers
124 views

bzip2 -c versus -z

Wanted to check for understanding; while revisiting the topic of using dd over netcat I experimented with compressing the data with bzip2. In the man page, there's -c (compress or decompress to ...
user avatar
4 votes
1 answer
753 views

Is it possible to get file list, byte range from the head of a tar+bzip2 file?

Essentially, I'm hoping someone with an advanced knowledge of tar/bz2 can answer whether this is possible. The situation is that we have a periodic 24GB feed of data from a vendor, as a .tbz file. (...
user avatar
  • 255
6 votes
1 answer
2k views

Why bzip2 --version behaves strange?

So if I enter the command $ gzip --version | head -n1 everything goes as expected. But if I try the same with bzip2: $ bzip2 --version | head -n1 I get a lot of lines and I have to press Ctrl-C to ...
user avatar
  • 544
232 votes
4 answers
83k views

Why are tar archive formats switching to xz compression to replace bzip2 and what about gzip?

More and more tar archives use the xz format based on LZMA2 for compression instead of the traditional bzip2(bz2) compression. In fact kernel.org made a late "Good-bye bzip2" announcement, 27th Dec. ...
user avatar
2 votes
1 answer
440 views

tar.bz2 7zip selective extract prformance

We use tar.bz2 as our archive of server logs. We also write tools that selectively parse these archived logs. Many times I must regex-search one file’s lines in the archive to determine if other ...
user avatar
4 votes
8 answers
9k views

Triple compression and I only save 1% in space?

I've been trying to save space on my linux server, and I had a folder containting, in subfolders, 22GB of images. So I decided to compress them. First I used tar: tar -zcf folder.tar folder Then ...
user avatar
  • 379
7 votes
2 answers
4k views

How to bzip a file with minimum cpu percentage?

I am using bzip2 to compress a file,the process takes more that 100% cpu.Is there any way to run bzip2 with minimum CPU precentage.
user avatar
11 votes
3 answers
32k views

bunzip2 to a different directory

Say I have a file foo.tbz2 in a directory. I want to extract the tar file from the archive, but to a different directory. It seems like bunzip2 will only extract the archive to the same directory as ...
user avatar
  • 390
12 votes
2 answers
18k views

How to check/test .tar.bz archives?

I've been using tar with its "--use-compress-prog=pbzip2" function to archive my files then compress them with pbzip2 to get an "*.tar.bz" archive. Afterwards I checked the resulting file with pbzip2'...
user avatar
  • 4,337
0 votes
2 answers
3k views

Install libbz2 from source on CentOS

I want to install the bz2 library from ssh to my CentOS server. I get it from the homepage and use tar -xvf command to extract it, but it does't have a configure file to compile and install it. ...
user avatar