LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

znew

Convert compress (.Z) files to gzip format

TLDR

Convert .Z file to .gz
$ znew [file.Z]
copy
Convert multiple files
$ znew [*.Z]
copy
Keep original file
$ znew -K [file.Z]
copy
Use best compression
$ znew -9 [file.Z]
copy
Force conversion even if .gz exists
$ znew -f [file.Z]
copy

SYNOPSIS

znew [-ftv9PK] file.Z...

DESCRIPTION

znew recompresses files from the old compress format (.Z) to gzip format (.gz). The compress utility used LZW compression, while gzip uses DEFLATE which typically achieves better compression ratios.The tool is useful for converting legacy compressed archives to the more modern and efficient gzip format. After conversion, the original .Z file is deleted by default.znew verifies the integrity of the new .gz file before removing the original when using the -t flag, providing safety against corruption.

PARAMETERS

-f

Force recompression even if .gz file already exists
-t
Test new file integrity before deleting original
-v
Verbose output
-9
Use best compression level
-P
Use pipes for conversion (slower but uses less disk space)
-K
Keep the original .Z file

INSTALL

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

CAVEATS

Only converts .Z files to .gz. Does not handle other compression formats.Without -K, the original file is deleted after successful conversion.The -P option uses more CPU but less temporary disk space.Modern systems rarely encounter .Z files, making this tool primarily useful for archival work.

HISTORY

The compress utility and .Z format date from the 1980s. gzip was created in 1992 as a free alternative that avoided LZW patent issues. znew was created to facilitate migration from the older format.

SEE ALSO

gzip(1), gunzip(1), zcat(1), compress(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