Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / usr.bin / gzip / zmore.1
1 .\" $FreeBSD: src/gnu/usr.bin/gzip/zmore.1,v 1.4 1999/08/27 23:35:56 peter Exp $
2 .\"
3 .TH ZMORE 1
4 .SH NAME
5 zmore \- file perusal filter for crt viewing of compressed text
6 .SH SYNOPSIS
7 .B zmore
8 [ name ...  ]
9 .SH DESCRIPTION
10 .I  Zmore
11 is a filter which allows examination of compressed or plain text files
12 one screenful at a time on a soft-copy terminal.
13 .I zmore
14 works on files compressed with
15 .I compress, pack
16 or
17 .I gzip,
18 and also on uncompressed files.
19 If a file does not exist,
20 .I zmore
21 looks for a file of the same name with the addition of a .gz, .z or .Z suffix.
22 .PP
23 .I Zmore
24 normally pauses after each screenful, printing --More--
25 at the bottom of the screen.
26 If the user then types a carriage return, one more line is displayed.
27 If the user hits a space,
28 another screenful is displayed.  Other possibilities are enumerated later.
29 .PP
30 .I Zmore
31 looks in the file
32 .I /usr/share/misc/termcap
33 to determine terminal characteristics,
34 and to determine the default window size.
35 On a terminal capable of displaying 24 lines,
36 the default window size is 22 lines.
37 To use a pager other than the default
38 .I more,
39 set environment variable PAGER to the name of the desired program, such as
40 .I less.
41 .PP
42 Other sequences which may be typed when
43 .I zmore
44 pauses, and their effects, are as follows (\fIi\fP is an optional integer
45 argument, defaulting to 1) :
46 .PP
47 .IP \fIi\|\fP<space>
48 display
49 .I i
50 more lines, (or another screenful if no argument is given)
51 .PP
52 .IP ^D
53 display 11 more lines (a ``scroll'').
54 If
55 .I i
56 is given, then the scroll size is set to \fIi\|\fP.
57 .PP
58 .IP d
59 same as ^D (control-D)
60 .PP
61 .IP \fIi\|\fPz
62 same as typing a space except that \fIi\|\fP, if present, becomes the new
63 window size.  Note that the window size reverts back to the default at the
64 end of the current file.
65 .PP
66 .IP \fIi\|\fPs
67 skip \fIi\|\fP lines and print a screenful of lines
68 .PP
69 .IP \fIi\|\fPf
70 skip \fIi\fP screenfuls and print a screenful of lines
71 .PP
72 .IP "q or Q"
73 quit reading the current file; go on to the next (if any)
74 .PP
75 .IP "e or q"
76 When the prompt --More--(Next file: 
77 .IR file )
78 is printed, this command causes zmore to exit.
79 .PP
80 .IP s
81 When the prompt --More--(Next file: 
82 .IR file )
83 is printed, this command causes zmore to skip the next file and continue.
84 .PP 
85 .IP =
86 Display the current line number.
87 .PP
88 .IP \fIi\|\fP/expr
89 search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP
90 If the pattern is not found,
91 .I zmore
92 goes on to the next file (if any).
93 Otherwise, a screenful is displayed, starting two lines before the place
94 where the expression was found.
95 The user's erase and kill characters may be used to edit the regular
96 expression.
97 Erasing back past the first column cancels the search command.
98 .PP
99 .IP \fIi\|\fPn
100 search for the \fIi\|\fP-th occurrence of the last regular expression entered.
101 .PP
102 .IP !command
103 invoke a shell with \fIcommand\|\fP. 
104 The character `!' in "command" are replaced with the
105 previous shell command.  The sequence "\\!" is replaced by "!".
106 .PP
107 .IP ":q or :Q"
108 quit reading the current file; go on to the next (if any)
109 (same as q or Q).
110 .PP
111 .IP .
112 (dot) repeat the previous command.
113 .PP
114 The commands take effect immediately, i.e., it is not necessary to
115 type a carriage return.
116 Up to the time when the command character itself is given,
117 the user may hit the line kill character to cancel the numerical
118 argument being formed.
119 In addition, the user may hit the erase character to redisplay the
120 --More-- message.
121 .PP
122 At any time when output is being sent to the terminal, the user can
123 hit the quit key (normally control\-\\).
124 .I Zmore
125 will stop sending output, and will display the usual --More--
126 prompt.
127 The user may then enter one of the above commands in the normal manner.
128 Unfortunately, some output is lost when this is done, due to the
129 fact that any characters waiting in the terminal's output queue
130 are flushed when the quit signal occurs.
131 .PP
132 The terminal is set to
133 .I noecho
134 mode by this program so that the output can be continuous.
135 What you type will thus not show on your terminal, except for the / and !
136 commands.
137 .PP
138 If the standard output is not a teletype, then
139 .I zmore
140 acts just like
141 .I zcat,
142 except that a header is printed before each file.
143 .SH FILES
144 .DT
145 /etc/termcap            Terminal data base
146 .SH "SEE ALSO"
147 more(1), gzip(1), zdiff(1), zgrep(1), znew(1), zforce(1), gzexe(1)