gzip(gnu zip)
gzip(gnu zip)功能说明:压缩文件。
语 法:gzip [-acdfhlLnNqrtvV][-S <压缩字尾字符串>][-<压缩效率>][--best/fast][文件...] 或 gzip [-acdfhlLnNqrtvV][-S <压缩字尾字符串>][-<压缩效率>][--best/fast][目录]
补充说明:gzip是个使用广泛的压缩程序,文件经它压缩过后,其名称后面会多出".gz"的扩展名。
参 数:
-a或--ascii 使用ASCII文字模式。
-c或--stdout或--to-stdout 把压缩后的文件输出到标准输出设备,不去更动原始文件。
-d或--decompress或----uncompress 解开压缩文件。
-f或--force 强行压缩文件。不理会文件名称或硬连接是否存在以及该文件是否为符号连接。
-h或--help 在线帮助。
-l或--list 列出压缩文件的相关信息。
-L或--license 显示版本与版权信息。
-n或--no-name 压缩文件时,不保存原来的文件名称及时间戳记。
-N或--name 压缩文件时,保存原来的文件名称及时间戳记。
-q或--quiet 不显示警告信息。
-r或--recursive 递归处理,将指定目录下的所有文件及子目录一并处理。
-S<压缩字尾字符串>或----suffix<压缩字尾字符串> 更改压缩字尾字符串。
-t或--test 测试压缩文件是否正确无误。
-v或--verbose 显示指令执行过程。
-V或--version 显示版本信息。
-<压缩效率> 压缩效率是一个介于1-9的数值,预设值为"6",指定愈大的数值,压缩效率就会愈高。
--best 此参数的效果和指定"-9"参数相同。
--fast 此参数的效果和指定"-1"参数相同。
gzip
gzip [options] [files] gunzip [options] [files] zcat[options] [files]
Compress specified files (or data read from standard input) with Lempel-Ziv coding (LZ77). Rename compressed file to filename.gz; keep ownership modes and access/modification times. Ignore symbolic links. Uncompress with gunzip, which takes all of gzip's options except those specified. zcat is identical to gunzip -c and takes the options -fhLV, described here. Files compressed with the compress command can be decompressed using these commands.
Options
Regulate the speed of compression using the specified digit n, where -1 or --fast indicates the fastest compression method (less compression), and -9 or --best indicates the slowest compression method (most compression). The default compression level is -6.
ASCII text mode: convert end-of-lines using local conventions. This option is supported only on some non-Unix systems.
Print output to standard output, and do not change input files.
Same as gunzip.
Force compression. gzip would normally prompt for permission to continue when the file has multiple links, its .gz version already exists, or it is reading compressed data to or from a terminal.
Display a help screen and then exit.
Expects to be given compressed files as arguments. Files may be compressed by any of the following methods: gzip, deflate, compress, lzh, or pack. For each file, list uncompressed and compressed sizes (the latter being always -1 for files compressed by programs other than gzip), compression ratio, and uncompressed name. With -v, also print compression method, the 32-bit CRC of the uncompressed data, and the timestamp. With -N, look inside the file for the uncompressed name and timestamp.
Display the gzip license and quit.
When compressing, do not save the original filename and timestamp by default. When decompressing, do not restore the original filename if present, and do not restore the original timestamp if present. This option is the default when decompressing.
Default. Save original name and timestamp. When decompressing, restore original name and timestamp.
Print no warnings.
When given a directory as an argument, recursively compress or decompress files within it.
Append .suffix. Default is gz. A null suffix while decompressing causes gunzip to attempt to decompress all specified files, regardless of suffix.
Test compressed file integrity.
Print name and percent size reduction for each file.
Display the version number and compilation options.