A container format for compressed streams. The .xz format can hold only a single file (it does not bundle multiple files into a single archive).
Questions tagged [xz]
41 questions
238
votes
4 answers
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. 2013, indicating kernel sources would from this…
user44370
9
votes
1 answer
Is there any way to check the compression ratio of a xz compressed file?
In windows by default one can see the compression ratio of zip files and after installing WinRAR it also supports this feature but currently I am using a linux and have compressed a file using lzma2 and xz as the container but how can I check the…
PSP
- 195
- 3
- 7
8
votes
1 answer
Is there any way to verify the integrity of an xz archive without decompressing the entire archive?
Can I check the integrity of the archive without decompressing it as the archive is 64GB. It is a backup of my old laptop and before i format my old laptop I wanted to verify the backup but it will take too long to decompress and verify. So is there…
PSP
- 195
- 3
- 7
8
votes
3 answers
RHEL6 + Error: xz compression not available
When installing packages via yum on a RHEL Server 6.6 system, I get the following error:
$ sudo yum install foo
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN…
Alex Reynolds
- 301
- 1
- 3
- 11
7
votes
1 answer
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 to make a file of twice the length of length…
Simd
- 325
- 1
- 2
- 11
7
votes
4 answers
How to convert all files from gzip to xz on the fly (and recursively)?
I have a directory tree with gzipped files like this:
basedir/a/file.dat.gz
basedir/b/file.dat.gz
basedir/c/file.dat.gz
etc.
How can I convert all of these from gzip to xz with a single command and without decompressing each file to disk?
The…
Martin Hennings
- 333
- 5
- 10
6
votes
1 answer
Writing to disk and compress with xz at the same time
I have a program that writes traces on disk and the size becomes very large. Normally, I use the following commands.
./run output.txt
xz output.txt
Can I pipe xz at the same time as output.txt is being written?
I read How to convert all files from…
mahmood
- 1,141
- 6
- 28
- 49
5
votes
2 answers
How do I know whether tar really pass XZ_OPT to xz?
What I am doing:
XZ_OPT='-T0 -9 -vv' tar -vvcJf ~/backup.tar.xz ...FILES
I doubt if tar really pass the given options, I have tried those things:
I used -vv in XZ_OPT, but there is no message from xz in the output, neither --verbose
I also useps…
Weihang Jian
- 1,149
- 1
- 9
- 15
5
votes
1 answer
How do I `grep` through .xz compresses files?
I'm using Red Hat Virtualization (RHV) and it logs all of its files in this directory:
$ pwd
/var/log/vdsm
$ ls | column -c 80 | head -10
backup vdsm.log.34.xz vdsm.log.69.xz
import vdsm.log.35.xz vdsm.log.6.xz
mom.log …
slm
- 363,520
- 117
- 767
- 871
4
votes
1 answer
Adjust logrotate to use xz for logs
On a current Debian Testing machine, I am wanting to use xz to compress log files instead of GZip. It has higher compression out of the box, and as such I wish to use it.
However, whenever I specify it in the logrotate configurations, logrotate…
Thomas Ward
- 2,600
- 2
- 18
- 31
4
votes
2 answers
XZ - Cannot allocate memory
If i run this command:
XZ_OPT=-9 tar --xz -cvf files/compressed/xz/archive.tar.xz -C files/original/ .
Get this message:
xz: (stdin): Cannot allocate memory
tar: files/compressed/lzma//archive.lzma: Wrote only 4096 of 10240 bytes
tar: Error is not…
Lajdák Marek
- 191
- 2
- 7
3
votes
1 answer
Multithreaded xz, with gzip, pv, and pipes - is this the most efficient I can get?
I'm excited to learn that xz now supports multithreading:
xz --threads=0
But now I want to utilise this as much as possible. For example, to recompress gzips as xz:
gzip -d -k -c myfile.gz | pv | xz -z --threads=0 - > myfile.xz
This results in my…
tudor -Reinstate Monica-
- 495
- 1
- 7
- 19
3
votes
4 answers
How to concatenate results of multiple commands and pipe into another without intermediate file?
Suppose I have four very large text files, all compressed with xz.
file1.log.xz
file2.log.xz
file3.log.xz
file4.log.xz
What I'd like to do is concatenate the uncompressed contents of these four files into a new file file.xz. The thing is, I would…
fdmillion
- 2,748
- 3
- 20
- 21
3
votes
3 answers
How to check what compression type an RPM package uses?
I recently realized that the RPM packages shifted from gzip-compression to xz-compression a few years ago. I need to check is the compression type of an RPM package that I have. I also need to check what compression type is considered by my system…
Alchemist
- 551
- 3
- 10
- 21
2
votes
1 answer
7z command to create a XZ file
The man page says 7z tool supports 7z, LZMA2, XZ, ZIP, Zip64, CAB, RAR, ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem images and DEB formats.
And it says we could pass the type as -t{Type}. The following command is success.
7z a -tzip…
NayabSD
- 184
- 1
- 9