gzip.1 (b626f5a73a48f44a31a200291b141e1da408a2ff) gzip.1 (90f528e8d7868a5d31dc35b24943c673bf67821d)
1.\" $NetBSD: gzip.1,v 1.26 2015/10/27 07:36:18 mrg Exp $
1.\" $NetBSD: gzip.1,v 1.30 2017/10/22 17:36:49 abhinav Exp $
2.\"
2.\"
3.\" Copyright (c) 1997, 2003, 2004 Matthew R. Green
3.\" Copyright (c) 1997, 2003, 2004, 2008, 2009, 2015, 2017 Matthew R. Green
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright

--- 8 unchanged lines hidden (view full) ---

20.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright

--- 8 unchanged lines hidden (view full) ---

20.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.Dd October 26, 2015
28.Dd November 21, 2017
29.Dt GZIP 1
30.Os
31.Sh NAME
29.Dt GZIP 1
30.Os
31.Sh NAME
32.Nm gzip
32.Nm gzip ,
33.Nm gunzip ,
34.Nm zcat
33.Nd compression/decompression tool using Lempel-Ziv coding (LZ77)
34.Sh SYNOPSIS
35.Nm
36.Op Fl cdfhkLlNnqrtVv
37.Op Fl S Ar suffix
38.Ar file
39.Oo
40.Ar file Oo ...

--- 66 unchanged lines hidden (view full) ---

107is also capable of decompressing files compressed using
108.Xr compress 1 ,
109.Xr bzip2 1 ,
110or
111.Xr xz 1 .
112.Sh OPTIONS
113The following options are available:
114.Bl -tag -width XXrXXXrecursiveX
35.Nd compression/decompression tool using Lempel-Ziv coding (LZ77)
36.Sh SYNOPSIS
37.Nm
38.Op Fl cdfhkLlNnqrtVv
39.Op Fl S Ar suffix
40.Ar file
41.Oo
42.Ar file Oo ...

--- 66 unchanged lines hidden (view full) ---

109is also capable of decompressing files compressed using
110.Xr compress 1 ,
111.Xr bzip2 1 ,
112or
113.Xr xz 1 .
114.Sh OPTIONS
115The following options are available:
116.Bl -tag -width XXrXXXrecursiveX
115.It Fl 1 , -fast
117.It Fl 1 , Fl Fl fast
116.It Fl 2 , 3 , 4 , 5 , 6 , 7 , 8
118.It Fl 2 , 3 , 4 , 5 , 6 , 7 , 8
117.It Fl 9 , -best
119.It Fl 9 , Fl Fl best
118These options change the compression level used, with the
119.Fl 1
120option being the fastest, with less compression, and the
121.Fl 9
122option being the slowest, with optimal compression.
123The default compression level is 6.
120These options change the compression level used, with the
121.Fl 1
122option being the fastest, with less compression, and the
123.Fl 9
124option being the slowest, with optimal compression.
125The default compression level is 6.
124.It Fl c , -stdout , -to-stdout
126.It Fl c , Fl Fl stdout , Fl Fl to-stdout
125This option specifies that output will go to the standard output
126stream, leaving files intact.
127This option specifies that output will go to the standard output
128stream, leaving files intact.
127.It Fl d , -decompress , -uncompress
129.It Fl d , Fl Fl decompress , Fl Fl uncompress
128This option selects decompression rather than compression.
130This option selects decompression rather than compression.
129.It Fl f , -force
131.It Fl f , Fl Fl force
130This option turns on force mode.
131This allows files with multiple links, symbolic links to regular files,
132overwriting of pre-existing files, reading from or writing to a terminal,
133and when combined with the
134.Fl c
135option, allowing non-compressed data to pass through unchanged.
132This option turns on force mode.
133This allows files with multiple links, symbolic links to regular files,
134overwriting of pre-existing files, reading from or writing to a terminal,
135and when combined with the
136.Fl c
137option, allowing non-compressed data to pass through unchanged.
136.It Fl h , -help
138.It Fl h , Fl Fl help
137This option prints a usage summary and exits.
139This option prints a usage summary and exits.
138.It Fl k , -keep
139Keep (do not delete) input files during compression
140or decompression.
140.It Fl k , Fl Fl keep
141This option prevents
142.Nm
143from deleting input files after (de)compression.
141.It Fl L , -license
142This option prints
143.Nm
144license.
144.It Fl L , -license
145This option prints
146.Nm
147license.
145.It Fl l , -list
148.It Fl l , Fl Fl list
146This option displays information about the file's compressed and
147uncompressed size, ratio, uncompressed name.
148With the
149.Fl v
150option, it also displays the compression method, CRC, date and time
151embedded in the file.
149This option displays information about the file's compressed and
150uncompressed size, ratio, uncompressed name.
151With the
152.Fl v
153option, it also displays the compression method, CRC, date and time
154embedded in the file.
152.It Fl N , -name
155.It Fl N , Fl Fl name
153This option causes the stored filename in the input file to be used
154as the output file.
156This option causes the stored filename in the input file to be used
157as the output file.
155.It Fl n , -no-name
158.It Fl n , Fl Fl no-name
156This option stops the filename and timestamp from being stored in
157the output file.
159This option stops the filename and timestamp from being stored in
160the output file.
158.It Fl q , -quiet
161.It Fl q , Fl Fl quiet
159With this option, no warnings or errors are printed.
162With this option, no warnings or errors are printed.
160.It Fl r , -recursive
163.It Fl r , Fl Fl recursive
161This option is used to
162.Nm
163the files in a directory tree individually, using the
164.Xr fts 3
165library.
164This option is used to
165.Nm
166the files in a directory tree individually, using the
167.Xr fts 3
168library.
166.It Fl S Ar suffix , Fl -suffix Ar suffix
169.It Fl S Ar suffix , Fl Fl suffix Ar suffix
167This option changes the default suffix from .gz to
168.Ar suffix .
170This option changes the default suffix from .gz to
171.Ar suffix .
169.It Fl t , -test
172.It Fl t , Fl Fl test
170This option will test compressed files for integrity.
173This option will test compressed files for integrity.
171.It Fl V , -version
174.It Fl V , Fl Fl version
172This option prints the version of the
173.Nm
174program.
175This option prints the version of the
176.Nm
177program.
175.It Fl v , -verbose
178.It Fl v , Fl Fl verbose
176This option turns on verbose mode, which prints the compression
177ratio for each file compressed.
178.El
179.Sh ENVIRONMENT
180If the environment variable
181.Ev GZIP
182is set, it is parsed as a white-space separated list of options
183handled before any options on the command line.
184Options on the command line will override anything in
185.Ev GZIP .
186.Sh EXIT STATUS
187The
188.Nm
189utility exits 0 on success,
1901 on errors,
191and 2 if a warning occurs.
179This option turns on verbose mode, which prints the compression
180ratio for each file compressed.
181.El
182.Sh ENVIRONMENT
183If the environment variable
184.Ev GZIP
185is set, it is parsed as a white-space separated list of options
186handled before any options on the command line.
187Options on the command line will override anything in
188.Ev GZIP .
189.Sh EXIT STATUS
190The
191.Nm
192utility exits 0 on success,
1931 on errors,
194and 2 if a warning occurs.
195.Sh SIGNALS
196.Nm
197responds to the following signals:
198.Bl -tag -width indent
199.It Dv SIGINFO
200Report progress to standard error.
201.El
192.Sh SEE ALSO
193.Xr bzip2 1 ,
194.Xr compress 1 ,
195.Xr xz 1 ,
196.Xr fts 3 ,
197.Xr zlib 3
198.Sh HISTORY
199The

--- 8 unchanged lines hidden (view full) ---

208.Nm
209program for
210.Nx 2.0 .
211.Pp
212This implementation of
213.Nm
214was ported based on the
215.Nx
202.Sh SEE ALSO
203.Xr bzip2 1 ,
204.Xr compress 1 ,
205.Xr xz 1 ,
206.Xr fts 3 ,
207.Xr zlib 3
208.Sh HISTORY
209The

--- 8 unchanged lines hidden (view full) ---

218.Nm
219program for
220.Nx 2.0 .
221.Pp
222This implementation of
223.Nm
224was ported based on the
225.Nx
216.Nm ,
226.Nm
227version 20170803,
217and first appeared in
218.Fx 7.0 .
219.Sh AUTHORS
220.An -nosplit
221This implementation of
222.Nm
223was written by
224.An Matthew R. Green Aq Mt mrg@eterna.com.au
225with unpack support written by
226.An Xin LI Aq Mt delphij@FreeBSD.org .
227.Sh BUGS
228According to RFC 1952, the recorded file size is stored in a 32-bit
229integer, therefore, it cannot represent files larger than 4GB.
230This limitation also applies to
231.Fl l
232option of
233.Nm
234utility.
228and first appeared in
229.Fx 7.0 .
230.Sh AUTHORS
231.An -nosplit
232This implementation of
233.Nm
234was written by
235.An Matthew R. Green Aq Mt mrg@eterna.com.au
236with unpack support written by
237.An Xin LI Aq Mt delphij@FreeBSD.org .
238.Sh BUGS
239According to RFC 1952, the recorded file size is stored in a 32-bit
240integer, therefore, it cannot represent files larger than 4GB.
241This limitation also applies to
242.Fl l
243option of
244.Nm
245utility.