<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://it-arts.net/index.php?action=history&amp;feed=atom&amp;title=XZ_-_Documentation</id>
	<title>XZ - Documentation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://it-arts.net/index.php?action=history&amp;feed=atom&amp;title=XZ_-_Documentation"/>
	<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=XZ_-_Documentation&amp;action=history"/>
	<updated>2026-05-02T18:43:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://it-arts.net/index.php?title=XZ_-_Documentation&amp;diff=842&amp;oldid=prev</id>
		<title>Admin: Text replacement - &quot;Category:Wiki&quot; to &quot;Category:Wiki

&#039;&#039;&#039;&#039;&#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&#039;&#039;&#039;&#039;&#039;
&quot;</title>
		<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=XZ_-_Documentation&amp;diff=842&amp;oldid=prev"/>
		<updated>2026-01-17T06:55:11Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;&amp;quot; to &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;  &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:55, 17 January 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Wiki]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Wiki]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&#039;&#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&#039;&#039;&#039;&#039;&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Common xz Command Use Cases ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Common xz Command Use Cases ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://it-arts.net/index.php?title=XZ_-_Documentation&amp;diff=789&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Category:Wiki  == Common xz Command Use Cases ==  === Compress a Single File === To compress a single file using the `xz` command:   &lt;nowiki&gt; xz filename.txt&lt;/nowiki&gt;  This command will compress `filename.txt` and replace it with `filename.txt.xz`. By default, `xz` removes the original file after compression.  === Compress a File but Keep the Original File === To compress a file while keeping the original file:   &lt;nowiki&gt; xz -k filename.txt&lt;/nowiki&gt;  The `-k` option...&quot;</title>
		<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=XZ_-_Documentation&amp;diff=789&amp;oldid=prev"/>
		<updated>2026-01-12T20:17:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;  == Common xz Command Use Cases ==  === Compress a Single File === To compress a single file using the `xz` command:   &amp;lt;nowiki&amp;gt; xz filename.txt&amp;lt;/nowiki&amp;gt;  This command will compress `filename.txt` and replace it with `filename.txt.xz`. By default, `xz` removes the original file after compression.  === Compress a File but Keep the Original File === To compress a file while keeping the original file:   &amp;lt;nowiki&amp;gt; xz -k filename.txt&amp;lt;/nowiki&amp;gt;  The `-k` option...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Wiki]]&lt;br /&gt;
&lt;br /&gt;
== Common xz Command Use Cases ==&lt;br /&gt;
&lt;br /&gt;
=== Compress a Single File ===&lt;br /&gt;
To compress a single file using the `xz` command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz filename.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will compress `filename.txt` and replace it with `filename.txt.xz`. By default, `xz` removes the original file after compression.&lt;br /&gt;
&lt;br /&gt;
=== Compress a File but Keep the Original File ===&lt;br /&gt;
To compress a file while keeping the original file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -k filename.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-k` option keeps the original file after compression, creating both `filename.txt.xz` and the original `filename.txt`.&lt;br /&gt;
&lt;br /&gt;
=== Decompress a File ===&lt;br /&gt;
To decompress a `.xz` file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -d filename.txt.xz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-d` option tells `xz` to decompress the file. The result will be `filename.txt` after decompression.&lt;br /&gt;
&lt;br /&gt;
=== View the Contents of a Compressed File Without Extracting ===&lt;br /&gt;
To view the contents of a compressed `.xz` file without extracting it:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -l filename.txt.xz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-l` option lists information about the compressed file, such as compression ratio and the original file size, without decompressing it.&lt;br /&gt;
&lt;br /&gt;
=== Compress Multiple Files Using xz ===&lt;br /&gt;
To compress multiple files into individual `.xz` files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz file1.txt file2.txt file3.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will create `file1.txt.xz`, `file2.txt.xz`, and `file3.txt.xz`.&lt;br /&gt;
&lt;br /&gt;
=== Create a Compressed Archive (Tarball) ===&lt;br /&gt;
To create a `.tar.xz` archive, which is a compressed tarball using `xz`:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
tar -caf archive.tar.xz file1.txt file2.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-c` creates a new archive, `-a` specifies the compression method (in this case, `xz`), and `-f` specifies the output file (`archive.tar.xz`).&lt;br /&gt;
&lt;br /&gt;
=== Compress a File to a Specific Compression Level ===&lt;br /&gt;
To specify the compression level (from 0 to 9, where 9 is the maximum compression):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -9 filename.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-9` option tells `xz` to use the maximum compression level, sacrificing speed for higher compression.&lt;br /&gt;
&lt;br /&gt;
=== Set the Compression Block Size ===&lt;br /&gt;
To specify the block size for the compression (default is 128KB):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -b 256k filename.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-b` option sets the block size, which can influence both the speed and the compression ratio. In this case, `256k` sets the block size to 256KB.&lt;br /&gt;
&lt;br /&gt;
== Advanced xz Command Options ==&lt;br /&gt;
&lt;br /&gt;
=== Display Compression Progress ===&lt;br /&gt;
To display the progress of the compression or decompression operation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -v filename.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-v` option enables verbose mode, showing the progress of the compression or decompression process.&lt;br /&gt;
&lt;br /&gt;
=== Force Overwrite of Existing Files ===&lt;br /&gt;
To force overwriting an existing `.xz` file without confirmation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -f filename.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-f` option forces `xz` to overwrite the output file if it already exists, without asking for confirmation.&lt;br /&gt;
&lt;br /&gt;
=== Compress Files with a Specific Extension ===&lt;br /&gt;
To compress all files with a certain extension in a directory:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz *.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command compresses all `.txt` files in the current directory and generates `.txt.xz` compressed files for each one.&lt;br /&gt;
&lt;br /&gt;
=== Test a Compressed File ===&lt;br /&gt;
To test the integrity of a compressed `.xz` file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -t filename.txt.xz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-t` option tests the file integrity, verifying that the file is not corrupted.&lt;br /&gt;
&lt;br /&gt;
=== Decompress a `.tar.xz` Archive ===&lt;br /&gt;
To decompress a `.tar.xz` archive and extract the files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
tar -xJf archive.tar.xz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-x` option extracts the archive, `-J` specifies `xz` as the compression method, and `-f` specifies the archive file.&lt;br /&gt;
&lt;br /&gt;
=== Specify the Compression Level Range for xz ===&lt;br /&gt;
To set a range of compression levels:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -0 filename.txt&lt;br /&gt;
xz -9 filename.txt&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-0` option is for minimal compression, and the `-9` option is for maximum compression.&lt;br /&gt;
&lt;br /&gt;
== Security Concepts ==&lt;br /&gt;
&lt;br /&gt;
=== Data Integrity and Verification ===&lt;br /&gt;
`xz` provides a feature to verify the integrity of compressed files, ensuring that they are not corrupted or altered during transmission or storage.&lt;br /&gt;
&lt;br /&gt;
Use the `-t` option to test the integrity of a compressed file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz -t filename.txt.xz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tests the compressed file for integrity, and if the file is corrupted, it will not decompress correctly.&lt;br /&gt;
&lt;br /&gt;
=== Encryption of Compressed Files ===&lt;br /&gt;
While `xz` does not have built-in encryption, you can combine it with tools like `gpg` to encrypt compressed files for secure storage or transmission.&lt;br /&gt;
&lt;br /&gt;
For example, compress and encrypt a file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz filename.txt &amp;amp;&amp;amp; gpg -c filename.txt.xz&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compresses `filename.txt` and then encrypts it using `gpg`.&lt;br /&gt;
&lt;br /&gt;
=== Protecting Archive Contents from Unauthorized Access ===&lt;br /&gt;
Although `xz` itself does not provide password protection, you can use it in combination with other tools (like `zip` or `gpg`) for secure compression and encryption.&lt;br /&gt;
&lt;br /&gt;
For example, use `gpg` for encryption after compressing a file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
xz filename.txt &amp;amp;&amp;amp; gpg -c filename.txt.xz&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This secures the file, ensuring that only authorized users can decompress or read the content.&lt;br /&gt;
&lt;br /&gt;
=== Reducing Exposure to File Extraction Risks ===&lt;br /&gt;
When working with `.tar.xz` archives, be cautious of security risks associated with extracting files from untrusted sources. Always inspect the contents of an archive before extraction, and consider using a sandbox environment.&lt;br /&gt;
&lt;br /&gt;
For example, inspect the contents of a `.tar.xz` file without extracting it:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
tar -tvJf archive.tar.xz&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will list the contents of the archive without extracting it, allowing you to check for any potentially harmful files before extracting.&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
&lt;br /&gt;
* https://man7.org/linux/man-pages/man1/xz.1.html&lt;br /&gt;
* https://www.gnu.org/software/xz/&lt;br /&gt;
* https://www.archlinux.org/packages/core/x86_64/xz/&lt;br /&gt;
* https://www.debian.org/distrib/packages#xz-utils&lt;br /&gt;
* https://www.redhat.com/en/docs/xz-utils&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>