xz file such as the compressed and uncompressed size of the file as well as the compression ratio, which shows us how much space our compression is saving. With the -l or -list flag we can see useful information regarding a compressed. Similar to example 3, it is possible to decompress a file and keep the original. xz -d īoth of these commands will produce the same result, decompressing to file.txt, removing the compressed file. To reverse the compression process and get the original file back that you have compressed, you can use the xz command itself or unxz which is also part of the xz package. The -c flag outputs the compressed copy of file.txt to stdout, this is then sent to, keeping the original file.txt file in place. This can also be done with the -c flag as below. You can instead keep the original file and create a compressed copy with the -k or -keep flag. Compress a single file and keep the original To instead compress all files within a directory, see example 10 below. This will compress all files specified in the command, note again that this will remove the original files specified by turning file1.txt, file2.txt and file3.txt into, and xz file1.txt file2.txt file3.txt This will compress file.txt and create, note that this will remove the original file.txt file. We are going to cover 13 examples of xz here, showing you common tasks that can be completed and just how easy it is to use.Ĭheck out some of our other compression tool examples:īefore starting you will need to have the xz package installed, this is usually already installed by default, however you can install it now if required.ĭebian: apt-get install xz-utils Example XZ Commands ![]() With xz we will typically get a better compression ratio. Xz is another general purpose data compression tool with syntax similar to the older and more popular gzip and bzip2 options.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |