⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gzip.1

📁 gzip源码
💻 1
📖 第 1 页 / 共 2 页
字号:
truncated.) When decompressing, do not restore the original file nameif present (remove only the.I gzipsuffix from the compressed file name) and do not restore the originaltime stamp if present (copy it from the compressed file). This optionis the default when decompressing..TP.B \-N --nameWhen compressing, always save the original file name and time stamp; thisis the default. When decompressing, restore the original file name andtime stamp if present. This option is useful on systems which havea limit on file name length or when the time stamp has been lost aftera file transfer..TP.B \-q --quietSuppress all warnings..TP.B \-r --recursiveTravel the directory structure recursively. If any of the file namesspecified on the command line are directories,.I gzipwill descend into the directory and compress all the files it finds there(or decompress them in the case of.I gunzip)..TP.B \-S .suf   --suffix .sufUse suffix .suf instead of .gz. Any suffix can be given, but suffixesother than .z and .gz should be avoided to avoid confusion when filesare transferred to other systems.  A null suffix forces gunzip to  trydecompression on all given files regardless of suffix, as in:    gunzip -S "" *       (*.* for MSDOS)Previous versions of gzip usedthe .z suffix. This was changed to avoid a conflict with.IR pack "(1)"..TP.B \-t --testTest. Check the compressed file integrity..TP.B \-v --verboseVerbose. Display the name and percentage reduction for each file compressedor decompressed..TP.B \-V --versionVersion. Display the version number and compilation options then quit..TP.B \-# --fast --bestRegulate the speed of compression using the specified digit.IR # ,where.B \-1or.B \-\-fastindicates the fastest compression method (less compression)and.B \-9or.B \-\-bestindicates the slowest compression method (best compression).The default compression level is.BR \-6(that is, biased towards high compression at expense of speed)..SH "ADVANCED USAGE"Multiple compressed files can be concatenated. In this case,.I gunzipwill extract all members at once. For example:      gzip -c file1  > foo.gz      gzip -c file2 >> foo.gzThen      gunzip -c foois equivalent to      cat file1 file2In case of damage to one member of a .gz file, other members canstill be recovered (if the damaged member is removed). However,you can get better compression by compressing all members at once:      cat file1 file2 | gzip > foo.gzcompresses better than      gzip -c file1 file2 > foo.gzIf you want to recompress concatenated files to get better compression, do:      gzip -cd old.gz | gzip > new.gzIf a compressed file consists of several members, the uncompressedsize and CRC reported by the --list option applies to the last memberonly. If you need the uncompressed size for all members, you can use:      gzip -cd file.gz | wc -cIf you wish to create a single archive file with multiple members sothat members can later be extracted independently, use an archiversuch as tar or zip. GNU tar supports the -z option to invoke gziptransparently. gzip is designed as a complement to tar, not as areplacement..SH "ENVIRONMENT"The environment variable.B GZIPcan hold a set of default options for.I gzip.These options are interpreted first and can be overwritten byexplicit command line parameters. For example:      for sh:    GZIP="-8v --name"; export GZIP      for csh:   setenv GZIP "-8v --name"      for MSDOS: set GZIP=-8v --nameOn Vax/VMS, the name of the environment variable is GZIP_OPT, toavoid a conflict with the symbol set for invocation of the program..SH "SEE ALSO"znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1),pack(1), compact(1).PPThe.I gzipfile format is specified in P. Deutsch, \s-1GZIP\s0 file formatspecification version 4.3,.BR <ftp://ftp.isi.edu/in-notes/rfc1952.txt> ,Internet RFC 1952 (May 1996).The.I zipdeflation format is specified in P. Deutsch, \s-1DEFLATE\s0 CompressedData Format Specification version 1.3,.BR <ftp://ftp.isi.edu/in-notes/rfc1951.txt> ,Internet RFC 1951 (May 1996)..SH "DIAGNOSTICS"Exit status is normally 0;if an error occurs, exit status is 1. If a warning occurs, exit status is 2..TPUsage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]Invalid options were specified on the command line..TP\fIfile\fP\^: not in gzip formatThe file specified to.I gunziphas not been compressed..TP\fIfile\fP\^: Corrupt input. Use zcat to recover some data.The compressed file has been damaged. The data up to the point of failurecan be recovered using      zcat \fIfile\fP > recover.TP\fIfile\fP\^: compressed with \fIxx\fP bits, can only handle \fIyy\fP bits.I Filewas compressed (using LZW) by a program that could deal withmore.I bitsthan the decompress code on this machine.Recompress the file with gzip, which compresses better and usesless memory..TP\fIfile\fP\^: already has .gz suffix -- no changeThe file is assumed to be already compressed.Rename the file and try again..TP\fIfile\fP already exists; do you wish to overwrite (y or n)?Respond "y" if you want the output file to be replaced; "n" if not..TPgunzip: corrupt inputA SIGSEGV violation was detected which usually means that the input file hasbeen corrupted..TP\fIxx.x%\fP Percentage of the input saved by compression.(Relevant only for.BR \-vand.BR \-l \.).TP-- not a regular file or directory: ignoredWhen the input file is not a regular file or directory,(e.g. a symbolic link, socket, FIFO, device file), it isleft unaltered..TP-- has \fIxx\fP other links: unchangedThe input file has links; it is left unchanged.  See.IR ln "(1)"for more information. Use the.B \-fflag to force compression of multiply-linked files..SH CAVEATSWhen writing compressed data to a tape, it is generally necessary topad the output with zeroes up to a block boundary. When the data isread and the whole block is passed to.I gunzipfor decompression,.I gunzipdetects that there is extra trailing garbage after the compressed dataand emits a warning by default. You have to use the --quiet option tosuppress the warning. This option can be set in the.B GZIPenvironment variable as in:  for sh:  GZIP="-q"  tar -xfz --block-compress /dev/rst0  for csh: (setenv GZIP -q; tar -xfz --block-compr /dev/rst0In the above example, gzip is invoked implicitly by the -z option ofGNU tar. Make sure that the same block size (-b option of tar) is usedfor reading and writing compressed data on tapes.  (This exampleassumes you are using the GNU version of tar.).SH BUGSThe gzip format represents the the input size modulo 2^32, so the--list option reports incorrect uncompressed sizes and compressionratios for uncompressed files 4 GB and larger.  To work around thisproblem, you can use the following command to discover a largeuncompressed file's true size:      zcat file.gz | wc -cThe --list option reports sizes as -1 and crc as ffffffff if thecompressed file is on a non seekable media.In some rare cases, the --best option gives worse compression thanthe default compression level (-6). On some highly redundant files,.I compresscompresses better than.I gzip..SH "COPYRIGHT NOTICE"Copyright \(co 1998, 1999, 2001 Free Software Foundation, Inc..brCopyright \(co 1992, 1993 Jean-loup Gailly.PPPermission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies..igPermission is granted to process this file through troff and print theresults, provided the printed document carries copying permissionnotice identical to this one except for the removal of this paragraph(this paragraph not being relevant to the printed manual)....PPPermission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one..PPPermission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translation approvedby the Foundation.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -