Various scripts in various languages.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Matteo Cypriani e28443a12e [archivers] shellcheck il y a 1 an
.. More markdownification of READMEs il y a 1 an
TODO Rename compression_utils -> archivers il y a 1 an [archivers] shellcheck il y a 1 an [archivers] shellcheck il y a 1 an (lz and uz)

The script emulates and extends commands lz and uz from the mtools.

Note: although is more powerful than mtools’ lz and uz, you should probably use als and aunpack from the atool package instead; they are much better and atool provides several other useful commands as well. This script is still useful when you can’t install Perl (atool is written in Perl).

This script handles the following archive formats through the standards options of GNU Tar:

  • tar
  • tar.gz (tgz)
  • tar.bz2 (tbz, tb2)
  • tar.xz (txz)
  • tar.lzma (tlz)
  • tar.Z (taz)

Note that you need GNU Tar, at least version 1.20 to support LZMA compressed archives, and version 1.22 for XZ compressed ones.

If the script is called as lz, the archive content is displayed. When called as uz, it is extracted.

To install lz and uz, move the script as lz in a directory in your PATH (for instance /usr/local/bin or $HOME/bin) and hard link it to uz:

cp /usr/local/bin/lz
ln /usr/local/bin/{lz,uz}

Alternatively, you can use the symbolic links provided along with the repository by adding the bin directory to your PATH, as explained in the main file.

The script compresses an uncompressed file, or recompresses a compressed file to XZ (with default compression level).

Known compression formats are GZip (.gz), BZip2 (.bz2), LZMA (.lzma), and Lempel-Ziv (.Z). Short tar compressed suffixes are also allowed: .tgz, .tbz, .tb2, .tlz, .taz.

In case of recompression, the original compressed file is kept. In case of compression (i.e. when the suffix of the file does not correspond to a known compression format), the original uncompressed file is removed.

Note: the atool package provides the arepack command, which can recompress to several formats and not only to XZ. xzize has the advantage to recompress on the fly rather than unpacking the archive entirely on the file system and repacking it afterwards.