LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

unxz

Decompress XZ compressed files

TLDR

Decompress file
$ unxz [file.xz]
copy
Keep original
$ unxz -k [file.xz]
copy
To stdout
$ unxz -c [file.xz]
copy
Force overwrite
$ unxz -f [file.xz]
copy
Decompress multiple
$ unxz [file1.xz] [file2.xz]
copy

SYNOPSIS

unxz [-k] [-c] [-f] [options] files

DESCRIPTION

unxz decompresses files that were compressed with the XZ format, which uses the LZMA2 algorithm for high compression ratios. It is functionally equivalent to running xz --decompress and is provided as a convenience command within the xz-utils package.By default, unxz replaces the compressed .xz file with the decompressed output, removing the original. The -k flag preserves the original compressed file, and -c writes decompressed data to standard output for piping to other commands.XZ is widely used in the Linux ecosystem for distributing source code tarballs, kernel sources, and package archives due to its excellent compression ratio. While decompression is fast, XZ compression is slower and more memory-intensive than alternatives like gzip or zstd.

PARAMETERS

-k

Keep original.
-c
Write to stdout.
-f
Force overwrite.
-v
Verbose mode.
-q
Quiet mode.

INSTALL

sudo apt install xz-utils
copy
sudo dnf install xz
copy
sudo pacman -S xz
copy
sudo apk add xz
copy
sudo zypper install xz
copy
brew install xz
copy
nix profile install nixpkgs#xz
copy

CAVEATS

Slow for very large files. Part of xz-utils. Single-threaded by default.

HISTORY

unxz is part of XZ Utils, created by Lasse Collin and first released in 2009 as the successor to LZMA Utils. The XZ format has become the standard compression for Linux kernel sources and many source tarballs.

SEE ALSO

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

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid