![Forrest logo](/images/logo.png)
znew
Znew is a command-line tool primarily used in Unix-like operating systems, specifically Linux, for compressing and decompressing files. It is part of the compress utilities package developed by the Free Software Foundation.
This tool is designed to work with files that have been compressed using the compress file compression utility. It provides a way to unpack these compressed files, known as .Z files.
Znew works by decompressing a .Z file and then recompressing it with the newer gzip compression algorithm. The resulting file has a .gz extension instead of .Z, making it compatible with other compression tools.
It uses the gzip utility internally to perform the compression and decompression operations.
Znew can be particularly helpful when working with old compressed files that need to be used with modern tools or systems that do not recognize the outdated .Z compression format.
The tool can be used from the command line by simply providing the name of the .Z file as an argument.
Znew also accepts multiple file names as arguments, allowing you to process multiple files at once.
By default, Znew creates the new compressed files with the same name as the original, but with the .gz extension. However, you can specify a different output file name if desired.
The tool also offers options to preserve or update the original file timestamps during the decompression and recompression process.
Overall, Znew provides a convenient way to upgrade and work with older .Z compressed files using the gzip compression algorithm.
List of commands for znew:
-
znew:tldr:271a3 znew: Recompress a file, [K]eeping the `.Z` file if it is smaller than the `.gz` file.$ znew -K ${filename1-Z}try on your machineexplain this command
-
znew:tldr:8a5c0 znew: Recompress a file from `.Z` to `.gz` format.$ znew ${filename1-Z}try on your machineexplain this command
-
znew:tldr:d4b7f znew: Recompress multiple files and display the achieved size reduction % per file.$ znew -v ${filename1-Z} ${filename2-Z} ${filename3-Z}try on your machineexplain this command
-
znew:tldr:e53b7 znew: Recompress a file using the slowest compression method (for optimal compression).$ znew -9 ${filename1-Z}try on your machineexplain this command