OSDN Git Service

util-linux 2.38: 翻訳予約。
[linuxjm/jm.git] / manual / util-linux / original / man1 / pg.1
1 '\" t
2 .\"     Title: pg
3 .\"    Author: [see the "AUTHOR(S)" section]
4 .\" Generator: Asciidoctor 2.0.15
5 .\"      Date: 2022-02-17
6 .\"    Manual: User Commands
7 .\"    Source: util-linux 2.38
8 .\"  Language: English
9 .\"
10 .TH "PG" "1" "2022-02-17" "util\-linux 2.38" "User Commands"
11 .ie \n(.g .ds Aq \(aq
12 .el       .ds Aq '
13 .ss \n[.ss] 0
14 .nh
15 .ad l
16 .de URL
17 \fI\\$2\fP <\\$1>\\$3
18 ..
19 .als MTO URL
20 .if \n[.g] \{\
21 .  mso www.tmac
22 .  am URL
23 .    ad l
24 .  .
25 .  am MTO
26 .    ad l
27 .  .
28 .  LINKSTYLE blue R < >
29 .\}
30 .SH "NAME"
31 pg \- browse pagewise through text files
32 .SH "SYNOPSIS"
33 .sp
34 \fBpg\fP \fB\-*\fIamount\fP *\-p\fP \fIprompt\fP \fB\-cefnrs\fP +line +/pattern/ file_ ...
35 .SH "DESCRIPTION"
36 .sp
37 \fBpg\fP displays a text file on a CRT one screenful at once. After each page, a prompt is displayed. The user may then either press the newline key to view the next page or one of the keys described below.
38 .sp
39 If no filename is given on the command line, \fBpg\fP reads from standard input. If standard output is not a terminal, \fBpg\fP acts like \fBcat\fP(1) but precedes each file with its name if there is more than one.
40 .sp
41 If input comes from a pipe, \fBpg\fP stores the data in a buffer file while reading, to make navigation possible.
42 .SH "OPTIONS"
43 .sp
44 \fBpg\fP accepts the following options:
45 .sp
46 \fB+\fP\fInumber\fP
47 .RS 4
48 Start at the given line number.
49 .RE
50 .sp
51 \fB+/\fP\fIpattern\fP*/*
52 .RS 4
53 Start at the line containing the Basic Regular Expression \fIpattern\fP given.
54 .RE
55 .sp
56 \fB\-\fP\fInumber\fP
57 .RS 4
58 The number of lines per page. By default, this is the number of CRT lines minus one.
59 .RE
60 .sp
61 \fB\-c\fP
62 .RS 4
63 Clear the screen before a page is displayed, if the terminfo entry for the terminal provides this capability.
64 .RE
65 .sp
66 \fB\-e\fP
67 .RS 4
68 Do not pause and display \fI(EOF)\fP at the end of a file.
69 .RE
70 .sp
71 \fB\-f\fP
72 .RS 4
73 Do not split long lines.
74 .RE
75 .sp
76 \fB\-n\fP
77 .RS 4
78 Without this option, commands must be terminated by a newline character.
79 .sp
80 With this option, \fBpg\fP advances once a command letter is entered.
81 .RE
82 .sp
83 \fB\-p\fP \fIstring\fP
84 .RS 4
85 Instead of the normal prompt \fI:\fP, \fIstring\fP is displayed. If \fIstring\fP contains \fB%d\fP, its first occurrence is replaced by the number of the current page.
86 .RE
87 .sp
88 \fB\-r\fP
89 .RS 4
90 Disallow the shell escape.
91 .RE
92 .sp
93 \fB\-s\fP
94 .RS 4
95 Print messages in \fIstandout\fP mode, if the terminfo entry for the terminal provides this capability.
96 .RE
97 .sp
98 \fB\-h\fP, \fB\-\-help\fP
99 .RS 4
100 Display help text and exit.
101 .RE
102 .sp
103 \fB\-V\fP, \fB\-\-version\fP
104 .RS 4
105 Print version and exit.
106 .RE
107 .SH "COMMANDS"
108 .sp
109 The following commands may be entered at the prompt. Commands preceded by \fIi\fP in this document accept a number as argument, positive or negative. If this argument starts with \fB+\fP or \fB\-\fP, it is interpreted relative to the current position in the input file, otherwise relative to the beginning.
110 .sp
111 \fIi\fP\fB<Enter>\fP
112 .RS 4
113 Display the next or the indicated page.
114 .RE
115 .sp
116 \fIi\fP\fBd\fP or \fB^D\fP
117 .RS 4
118 Display the next halfpage. If \fIi\fP is given, it is always interpreted relative to the current position.
119 .RE
120 .sp
121 \fIi\fP\fBl\fP
122 .RS 4
123 Display the next or the indicated line.
124 .RE
125 .sp
126 \fIi\fP\fBf\fP
127 .RS 4
128 Skip a page forward. \fIi\fP must be a positive number and is always interpreted relative to the current position.
129 .RE
130 .sp
131 \fIi\fP\fBw\fP or \fIi\fP\fBz\fP
132 .RS 4
133 As \fB<Enter>\fP except that \fIi\fP becomes the new page size.
134 .RE
135 .sp
136 \fB.\fP or \fB^L\fP
137 .RS 4
138 Redraw the screen.
139 .RE
140 .sp
141 \fB$\fP
142 .RS 4
143 Advance to the last line of the input file.
144 .RE
145 .sp
146 \fIi\fP\fB/\fP\fIpattern\fP\fB/\fP
147 .RS 4
148 Search forward until the first or the \fIi\fP\-th occurrence of the Basic Regular Expression \fIpattern\fP is found. The search starts after the current page and stops at the end of the file. No wrap\-around is performed. \fIi\fP must be a positive number.
149 .RE
150 .sp
151 \fIi\fP\fB?\fP\fIpattern\fP\fB?\fP or \fIi\fP\fB\fP\fIpattern\fP\fB\fP
152 .RS 4
153 Search backward until the first or the \fIi\fP\-th occurrence of the Basic Regular Expression \fIpattern\fP is found. The search starts before the current page and stops at the beginning of the file. No wrap\-around is performed. \fIi\fP must be a positive number.
154 .RE
155 .sp
156 The search commands accept an added letter. If \fBt\fP is given, the line containing the pattern is displayed at the top of the screen, which is the default. \fBm\fP selects the middle and \fBb\fP the bottom of the screen. The selected position is used in following searches, too.
157 .sp
158 \fIi\fP\fBn\fP
159 .RS 4
160 Advance to the next file or \fIi\fP files forward.
161 .RE
162 .sp
163 \fIi\fP\fBp\fP
164 .RS 4
165 Reread the previous file or \fIi\fP files backward.
166 .RE
167 .sp
168 \fBs\fP \fIfilename\fP
169 .RS 4
170 Save the current file to the given \fIfilename\fP.
171 .RE
172 .sp
173 \fBh\fP
174 .RS 4
175 Display a command summary.
176 .RE
177 .sp
178 \fB!\fP\fIcommand\fP
179 .RS 4
180 Execute \fIcommand\fP using the shell.
181 .RE
182 .sp
183 \fBq\fP or \fBQ\fP
184 .RS 4
185 Quit.
186 .RE
187 .sp
188 If the user presses the interrupt or quit key while \fBpg\fP reads from the input file or writes on the terminal, \fBpg\fP will immediately display the prompt. In all other situations these keys will terminate \fBpg\fP.
189 .SH "ENVIRONMENT"
190 .sp
191 The following environment variables affect the behavior of \fBpg\fP:
192 .sp
193 \fBCOLUMNS\fP
194 .RS 4
195 Overrides the system\-supplied number of columns if set.
196 .RE
197 .sp
198 \fBLANG\fP, \fBLC_ALL\fP, \fBLC_COLLATE\fP, \fBLC_CTYPE\fP, \fBLC_MESSAGES\fP
199 .RS 4
200 See \fBlocale\fP(7).
201 .RE
202 .sp
203 \fBLINES\fP
204 .RS 4
205 Overrides the system\-supplied number of lines if set.
206 .RE
207 .sp
208 \fBSHELL\fP
209 .RS 4
210 Used by the \fB!\fP command.
211 .RE
212 .sp
213 \fBTERM\fP
214 .RS 4
215 Determines the terminal type.
216 .RE
217 .SH "NOTES"
218 .sp
219 \fBpg\fP expects the terminal tabulators to be set every eight positions.
220 .sp
221 Files that include NUL characters cannot be displayed by \fBpg\fP.
222 .SH "SEE ALSO"
223 .sp
224 \fBcat\fP(1),
225 \fBmore\fP(1),
226 \fBsh\fP(1p),
227 \fBterminfo\fP(5),
228 \fBlocale\fP(7),
229 \fBregex\fP(7),
230 \fBterm\fP(7)
231 .SH "REPORTING BUGS"
232 .sp
233 For bug reports, use the issue tracker at \c
234 .URL "https://github.com/util\-linux/util\-linux/issues" "" "."
235 .SH "AVAILABILITY"
236 .sp
237 The \fBpg\fP command is part of the util\-linux package which can be downloaded from \c
238 .URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."