xref: /freebsd/usr.bin/gzip/zmore.1 (revision cbb3ec25236ba72f91cbdf23f8b78b9d1af0cedf)
1.\"	$NetBSD: zmore.1,v 1.4 2013/11/12 21:58:37 pettai Exp $
2.\"	$OpenBSD: zmore.1,v 1.10 2009/08/16 09:41:08 sobrado Exp $
3.\"
4.\" Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
5.\"
6.\" Permission to use, copy, modify, and distribute this software for any
7.\" purpose with or without fee is hereby granted, provided that the above
8.\" copyright notice and this permission notice appear in all copies.
9.\"
10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\"
18.\" Sponsored in part by the Defense Advanced Research Projects
19.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
20.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
21.Dd October 22, 2014
22.Dt ZMORE 1
23.Os
24.Sh NAME
25.Nm zmore ,
26.Nm zless
27.Nd view compressed files
28.Sh SYNOPSIS
29.Nm zmore
30.Op Ar flags
31.Op Ar
32.Nm zless
33.Op Ar flags
34.Op Ar
35.Sh DESCRIPTION
36.Nm
37is a filter that allows the viewing of files compressed with Lempel-Ziv
38encoding.
39Such files generally have a
40.Dq Z
41or
42.Dq gz
43extension (both the
44.Xr compress 1
45and
46.Xr gzip 1
47formats are supported).
48Any
49.Ar flags
50that are specified are passed to the user's preferred
51.Ev PAGER
52(which is
53.Pa /usr/bin/more
54by default).
55.Pp
56.Nm zless
57is equivalent to
58.Nm zmore
59but uses
60.Xr less 1
61as a pager instead of
62.Xr more 1 .
63.Pp
64When multiple files are specified,
65.Nm
66will pause at the end of each file and present the following prompt to the user:
67.Bd -literal -offset indent
68prev_file (END) - Next: next_file
69.Ed
70.Pp
71Where
72.Sy prev_file
73is the file that was just displayed and
74.Sy next_file
75is the next file to be displayed.
76The following keys are recognized at the prompt:
77.Bl -tag -width "e or q" -offset indent
78.It Ic e No or Ic q
79quit
80.Nm zmore .
81.It Ic s
82skip the next file (or exit if the next file is the last).
83.El
84.Pp
85If no files are specified,
86.Nm
87will read from the standard input.
88In this mode
89.Nm
90will assume
91.Xr gzip 1
92style compression since there is no suffix on which to make a decision.
93.Sh ENVIRONMENT
94.Bl -tag -width "PAGER"
95.It Ev PAGER
96Program used to display files.
97If unset,
98.Pa /usr/bin/more
99is used
100.Pq Nm zmore
101or
102.Pa /usr/bin/less
103.Pq Nm zless .
104.El
105.Sh SEE ALSO
106.Xr compress 1 ,
107.Xr less 1 ,
108.Xr more 1
109