LinuxCommandLibrary

unlzma

Decompress .lzma files

TLDR

View documentation for the original command

$ tldr xz
copy

SYNOPSIS

unlzma [options] [file]

PARAMETERS

-c, --stdout, --to-stdout
    Write to standard output, keep original files.

-d, --decompress
    Force decompression.

-f, --force
    Force overwrite if output file exists.

-h, --help
    Display help and exit.

-k, --keep
    Keep (don't delete) input files.

-l, --list
    List compressed file contents.

-q, --quiet, --silent
    Suppress all warnings.

-t, --test
    Test compressed file integrity.

-v, --verbose
    Be verbose.

-V, --version
    Display version number and exit.

[file]
    LZMA compressed file to decompress. If no file is given, read from standard input.

DESCRIPTION

The unlzma command is a Linux utility used for decompressing files that have been compressed using the LZMA (Lempel-Ziv-Markov chain Algorithm) compression method. It reads an LZMA-compressed file and restores it to its original, uncompressed state. This is the opposite of the `lzma` command, which compresses files using the same algorithm.

Typically, LZMA compressed files have the `.lzma` extension. `unlzma` can decompress such files, and by default, it replaces the compressed file with the decompressed version, removing the `.lzma` extension. It is often used in scripts or automated processes for handling LZMA compressed archives or data.

If the input is not a valid LZMA file, or if an error occurs during decompression, unlzma will typically output an error message.

CAVEATS

If the decompression process fails, the original compressed file might be corrupted. It's recommended to make a backup before using `unlzma`.

EXIT STATUS

The exit status is 0 on success, 1 for a file error, 2 for an unrecoverable program error, 3 for internal logic error, 4 for invalid command line option, 5 for out of memory error, 6 for serious error during uncompressing, 7 for file format error, 8 for unexpected end of input.

HISTORY

LZMA (Lempel-Ziv-Markov chain Algorithm) was developed by Igor Pavlov. The `unlzma` command is part of the XZ Utils package. XZ Utils replaced the older LZMA Utils package due to licensing concerns and improvements in the XZ format. It became a common utility for archiving and compressing data, especially in Linux distributions for package management and software distribution.

SEE ALSO

lzma(1), xz(1), gzip(1), bzip2(1)

Copied to clipboard