Linux command
znew 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Convert .Z file to .gz
znew [file.Z]
Convert multiple files
znew [*.Z]
Keep original file
znew -K [file.Z]
Use best compression
znew -9 [file.Z]
Force conversion even if .gz exists
znew -f [file.Z]
说明
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.
参数
- -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
FAQ
What is the znew command used for?
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.
How do I run a basic znew example?
Run `znew [file.Z]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f do in znew?
Force recompression even if .gz file already exists