1MORE(1P) POSIX Programmer's Manual MORE(1P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 more — display files on a page-by-page basis
13
15 more [-ceisu] [-n number] [-p command] [-t tagstring] [file...]
16
18 The more utility shall read files and either write them to the terminal
19 on a page-by-page basis or filter them to standard output. If standard
20 output is not a terminal device, all input files shall be copied to
21 standard output in their entirety, without modification, except as
22 specified for the -s option. If standard output is a terminal device,
23 the files shall be written a number of lines (one screenful) at a time
24 under the control of user commands. See the EXTENDED DESCRIPTION sec‐
25 tion.
26
27 Certain block-mode terminals do not have all the capabilities necessary
28 to support the complete more definition; they are incapable of accept‐
29 ing commands that are not terminated with a <newline>. Implementations
30 that support such terminals shall provide an operating mode to more in
31 which all commands can be terminated with a <newline> on those termi‐
32 nals. This mode:
33
34 * Shall be documented in the system documentation
35
36 * Shall, at invocation, inform the user of the terminal deficiency
37 that requires the <newline> usage and provide instructions on how
38 this warning can be suppressed in future invocations
39
40 * Shall not be required for implementations supporting only fully
41 capable terminals
42
43 * Shall not affect commands already requiring <newline> characters
44
45 * Shall not affect users on the capable terminals from using more as
46 described in this volume of POSIX.1‐2017
47
49 The more utility shall conform to the Base Definitions volume of
50 POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines, except that '+'
51 may be recognized as an option delimiter as well as '-'.
52
53 The following options shall be supported:
54
55 -c If a screen is to be written that has no lines in common with
56 the current screen, or more is writing its first screen, more
57 shall not scroll the screen, but instead shall redraw each
58 line of the screen in turn, from the top of the screen to the
59 bottom. In addition, if more is writing its first screen, the
60 screen shall be cleared. This option may be silently ignored
61 on devices with insufficient terminal capabilities.
62
63 -e Exit immediately after writing the last line of the last file
64 in the argument list; see the EXTENDED DESCRIPTION section.
65
66 -i Perform pattern matching in searches without regard to case;
67 see the Base Definitions volume of POSIX.1‐2017, Section 9.2,
68 Regular Expression General Requirements.
69
70 -n number Specify the number of lines per screenful. The number argu‐
71 ment is a positive decimal integer. The -n option shall over‐
72 ride any values obtained from any other source.
73
74 -p command
75 Each time a screen from a new file is displayed or redis‐
76 played (including as a result of more commands; for example,
77 :p), execute the more command(s) in the command arguments in
78 the order specified, as if entered by the user after the
79 first screen has been displayed. No intermediate results
80 shall be displayed (that is, if the command is a movement to
81 a screen different from the normal first screen, only the
82 screen resulting from the command shall be displayed.) If any
83 of the commands fail for any reason, an informational message
84 to this effect shall be written, and no further commands
85 specified using the -p option shall be executed for this
86 file.
87
88 -s Behave as if consecutive empty lines were a single empty
89 line.
90
91 -t tagstring
92 Write the screenful of the file containing the tag named by
93 the tagstring argument. See the ctags utility. The tags fea‐
94 ture represented by -t tagstring and the :t command is
95 optional. It shall be provided on any system that also pro‐
96 vides a conforming implementation of ctags; otherwise, the
97 use of -t produces undefined results.
98
99 The filename resulting from the -t option shall be logically
100 added as a prefix to the list of command line files, as if
101 specified by the user. If the tag named by the tagstring
102 argument is not found, it shall be an error, and more shall
103 take no further action.
104
105 If the tag specifies a line number, the first line of the
106 display shall contain the beginning of that line. If the tag
107 specifies a pattern, the first line of the display shall con‐
108 tain the beginning of the matching text from the first line
109 of the file that contains that pattern. If the line does not
110 exist in the file or matching text is not found, an informa‐
111 tional message to this effect shall be displayed, and more
112 shall display the default screen as if -t had not been speci‐
113 fied.
114
115 If both the -t tagstring and -p command options are given,
116 the -t tagstring shall be processed first; that is, the file
117 and starting line for the display shall be as specified by
118 -t, and then the -p more command shall be executed. If the
119 line (matching text) specified by the -t command does not
120 exist (is not found), no -p more command shall be executed
121 for this file at any time.
122
123 -u Treat a <backspace> as a printable control character, dis‐
124 played as an implementation-defined character sequence (see
125 the EXTENDED DESCRIPTION section), suppressing backspacing
126 and the special handling that produces underlined or standout
127 mode text on some terminal types. Also, do not ignore a
128 <carriage-return> at the end of a line.
129
131 The following operand shall be supported:
132
133 file A pathname of an input file. If no file operands are speci‐
134 fied, the standard input shall be used. If a file is '-', the
135 standard input shall be read at that point in the sequence.
136
138 The standard input shall be used only if no file operands are speci‐
139 fied, or if a file operand is '-'.
140
142 The input files being examined shall be text files. If standard output
143 is a terminal, standard error shall be used to read commands from the
144 user. If standard output is a terminal, standard error is not readable,
145 and command input is needed, more may attempt to obtain user commands
146 from the controlling terminal (for example, /dev/tty); otherwise, more
147 shall terminate with an error indicating that it was unable to read
148 user commands. If standard output is not a terminal, no error shall
149 result if standard error cannot be opened for reading.
150
152 The following environment variables shall affect the execution of more:
153
154 COLUMNS Override the system-selected horizontal display line size.
155 See the Base Definitions volume of POSIX.1‐2017, Chapter 8,
156 Environment Variables for valid values and results when it is
157 unset or null.
158
159 EDITOR Used by the v command to select an editor. See the EXTENDED
160 DESCRIPTION section.
161
162 LANG Provide a default value for the internationalization vari‐
163 ables that are unset or null. (See the Base Definitions vol‐
164 ume of POSIX.1‐2017, Section 8.2, Internationalization Vari‐
165 ables for the precedence of internationalization variables
166 used to determine the values of locale categories.)
167
168 LC_ALL If set to a non-empty string value, override the values of
169 all the other internationalization variables.
170
171 LC_COLLATE
172 Determine the locale for the behavior of ranges, equivalence
173 classes, and multi-character collating elements within regu‐
174 lar expressions.
175
176 LC_CTYPE Determine the locale for the interpretation of sequences of
177 bytes of text data as characters (for example, single-byte as
178 opposed to multi-byte characters in arguments and input
179 files) and the behavior of character classes within regular
180 expressions.
181
182 LC_MESSAGES
183 Determine the locale that should be used to affect the format
184 and contents of diagnostic messages written to standard error
185 and informative messages written to standard output.
186
187 NLSPATH Determine the location of message catalogs for the processing
188 of LC_MESSAGES.
189
190 LINES Override the system-selected vertical screen size, used as
191 the number of lines in a screenful. See the Base Definitions
192 volume of POSIX.1‐2017, Chapter 8, Environment Variables for
193 valid values and results when it is unset or null. The -n
194 option shall take precedence over the LINES variable for
195 determining the number of lines in a screenful.
196
197 MORE Determine a string containing options described in the
198 OPTIONS section preceded with <hyphen-minus> characters and
199 <blank>-separated as on the command line. Any command line
200 options shall be processed after those in the MORE variable,
201 as if the command line were:
202
203
204 more $MORE options operands
205
206 The MORE variable shall take precedence over the TERM and
207 LINES variables for determining the number of lines in a
208 screenful.
209
210 TERM Determine the name of the terminal type. If this variable is
211 unset or null, an unspecified default terminal type is used.
212
214 Default.
215
217 The standard output shall be used to write the contents of the input
218 files.
219
221 The standard error shall be used for diagnostic messages and user com‐
222 mands (see the INPUT FILES section), and, if standard output is a ter‐
223 minal device, to write a prompting string. The prompting string shall
224 appear on the screen line below the last line of the file displayed in
225 the current screenful. The prompt shall contain the name of the file
226 currently being examined and shall contain an end-of-file indication
227 and the name of the next file, if any, when prompting at the end-of-
228 file. If an error or informational message is displayed, it is unspeci‐
229 fied whether it is contained in the prompt. If it is not contained in
230 the prompt, it shall be displayed and then the user shall be prompted
231 for a continuation character, at which point another message or the
232 user prompt may be displayed. The prompt is otherwise unspecified. It
233 is unspecified whether informational messages are written for other
234 user commands.
235
237 None.
238
240 The following section describes the behavior of more when the standard
241 output is a terminal device. If the standard output is not a terminal
242 device, no options other than -s shall have any effect, and all input
243 files shall be copied to standard output otherwise unmodified, at which
244 time more shall exit without further action.
245
246 The number of lines available per screen shall be determined by the -n
247 option, if present, or by examining values in the environment (see the
248 ENVIRONMENT VARIABLES section). If neither method yields a number, an
249 unspecified number of lines shall be used.
250
251 The maximum number of lines written shall be one less than this number,
252 because the screen line after the last line written shall be used to
253 write a user prompt and user input. If the number of lines in the
254 screen is less than two, the results are undefined. It is unspecified
255 whether user input is permitted to be longer than the remainder of the
256 single line where the prompt has been written.
257
258 The number of columns available per line shall be determined by examin‐
259 ing values in the environment (see the ENVIRONMENT VARIABLES section),
260 with a default value as described in the Base Definitions volume of
261 POSIX.1‐2017, Chapter 8, Environment Variables.
262
263 Lines that are longer than the display shall be folded; the length at
264 which folding occurs is unspecified, but should be appropriate for the
265 output device. Folding may occur between glyphs of single characters
266 that take up multiple display columns.
267
268 When standard output is a terminal and -u is not specified, more shall
269 treat <backspace> and <carriage-return> characters specially:
270
271 * A character, followed first by a sequence of n <backspace> charac‐
272 ters (where n is the same as the number of column positions that
273 the character occupies), then by n <underscore> characters ('_'),
274 shall cause that character to be written as underlined text, if the
275 terminal type supports that. The n <underscore> characters, fol‐
276 lowed first by n <backspace> characters, then any character with n
277 column positions, shall also cause that character to be written as
278 underlined text, if the terminal type supports that.
279
280 * A sequence of n <backspace> characters (where n is the same as the
281 number of column positions that the previous character occupies)
282 that appears between two identical printable characters shall cause
283 the first of those two characters to be written as emboldened text
284 (that is, visually brighter, standout mode, or inverse-video mode),
285 if the terminal type supports that, and the second to be discarded.
286 Immediately subsequent occurrences of <backspace>/character pairs
287 for that same character shall also be discarded. (For example, the
288 sequence "a\ba\ba\ba" is interpreted as a single emboldened 'a'.)
289
290 * The more utility shall logically discard all other <backspace>
291 characters from the line as well as the character which precedes
292 them, if any.
293
294 * A <carriage-return> at the end of a line shall be ignored, rather
295 than being written as a non-printable character, as described in
296 the next paragraph.
297
298 It is implementation-defined how other non-printable characters are
299 written. Implementations should use the same format that they use for
300 the ex print command; see the OPTIONS section within the ed utility. It
301 is unspecified whether a multi-column character shall be separated if
302 it crosses a display line boundary; it shall not be discarded. The
303 behavior is unspecified if the number of columns on the display is less
304 than the number of columns any single character in the line being dis‐
305 played would occupy.
306
307 When each new file is displayed (or redisplayed), more shall write the
308 first screen of the file. Once the initial screen has been written,
309 more shall prompt for a user command. If the execution of the user com‐
310 mand results in a screen that has lines in common with the current
311 screen, and the device has sufficient terminal capabilities, more shall
312 scroll the screen; otherwise, it is unspecified whether the screen is
313 scrolled or redrawn.
314
315 For all files but the last (including standard input if no file was
316 specified, and for the last file as well, if the -e option was not
317 specified), when more has written the last line in the file, more shall
318 prompt for a user command. This prompt shall contain the name of the
319 next file as well as an indication that more has reached end-of-file.
320 If the user command is f, <control>‐F, <space>, j, <newline>, d, <con‐
321 trol>‐D, or s, more shall display the next file. Otherwise, if display‐
322 ing the last file, more shall exit. Otherwise, more shall execute the
323 user command specified.
324
325 Several of the commands described in this section display a previous
326 screen from the input stream. In the case that text is being taken from
327 a non-rewindable stream, such as a pipe, it is implementation-defined
328 how much backwards motion is supported. If a command cannot be executed
329 because of a limitation on backwards motion, an error message to this
330 effect shall be displayed, the current screen shall not change, and the
331 user shall be prompted for another command.
332
333 If a command cannot be performed because there are insufficient lines
334 to display, more shall alert the terminal. If a command cannot be per‐
335 formed because there are insufficient lines to display or a / command
336 fails: if the input is the standard input, the last screen in the file
337 may be displayed; otherwise, the current file and screen shall not
338 change, and the user shall be prompted for another command.
339
340 The interactive commands in the following sections shall be supported.
341 Some commands can be preceded by a decimal integer, called count in the
342 following descriptions. If not specified with the command, count shall
343 default to 1. In the following descriptions, pattern is a basic regular
344 expression, as described in the Base Definitions volume of
345 POSIX.1‐2017, Section 9.3, Basic Regular Expressions. The term ``exam‐
346 ine'' is historical usage meaning ``open the file for viewing''; for
347 example, more foo would be expressed as examining file foo.
348
349 In the following descriptions, unless otherwise specified, line is a
350 line in the more display, not a line from the file being examined.
351
352 In the following descriptions, the current position refers to two
353 things:
354
355 1. The position of the current line on the screen
356
357 2. The line number (in the file) of the current line on the screen
358
359 Usually, the line on the screen corresponding to the current position
360 is the third line on the screen. If this is not possible (there are
361 fewer than three lines to display or this is the first page of the
362 file, or it is the last page of the file), then the current position is
363 either the first or last line on the screen as described later.
364
365 Help
366 Synopsis:
367
368 h
369
370 Write a summary of these commands and other implementation-defined com‐
371 mands. The behavior shall be as if the more utility were executed with
372 the -e option on a file that contained the summary information. The
373 user shall be prompted as described earlier in this section when end-
374 of-file is reached. If the user command is one of those specified to
375 continue to the next file, more shall return to the file and screen
376 state from which the h command was executed.
377
378 Scroll Forward One Screenful
379 Synopsis:
380
381 [count]f
382 [count]<control>-F
383
384 Scroll forward count lines, with a default of one screenful. If count
385 is more than the screen size, only the final screenful shall be writ‐
386 ten.
387
388 Scroll Backward One Screenful
389 Synopsis:
390
391 [count]b
392 [count]<control>-B
393
394 Scroll backward count lines, with a default of one screenful (see the
395 -n option). If count is more than the screen size, only the final
396 screenful shall be written.
397
398 Scroll Forward One Line
399 Synopsis:
400
401 [count]<space>
402 [count]j
403 [count]<newline>
404
405 Scroll forward count lines. The default count for the <space> shall be
406 one screenful; for j and <newline>, one line. The entire count lines
407 shall be written, even if count is more than the screen size.
408
409 Scroll Backward One Line
410 Synopsis:
411
412 [count]k
413
414 Scroll backward count lines. The entire count lines shall be written,
415 even if count is more than the screen size.
416
417 Scroll Forward One Half Screenful
418 Synopsis:
419
420 [count]d
421 [count]<control>-D
422
423 Scroll forward count lines, with a default of one half of the screen
424 size. If count is specified, it shall become the new default for subse‐
425 quent d, <control>‐D, and u commands.
426
427 Skip Forward One Line
428 Synopsis:
429
430 [count]s
431
432 Display the screenful beginning with the line count lines after the
433 last line on the current screen. If count would cause the current posi‐
434 tion to be such that less than one screenful would be written, the last
435 screenful in the file shall be written.
436
437 Scroll Backward One Half Screenful
438 Synopsis:
439
440 [count]u
441 [count]<control>-U
442
443 Scroll backward count lines, with a default of one half of the screen
444 size. If count is specified, it shall become the new default for subse‐
445 quent d, <control>-D, u, and <control>-U commands. The entire count
446 lines shall be written, even if count is more than the screen size.
447
448 Go to Beginning of File
449 Synopsis:
450
451 [count]g
452
453 Display the screenful beginning with line count.
454
455 Go to End-of-File
456 Synopsis:
457
458 [count]G
459
460 If count is specified, display the screenful beginning with the line
461 count. Otherwise, display the last screenful of the file.
462
463 Refresh the Screen
464 Synopsis:
465
466 r
467 <control>-L
468
469 Refresh the screen.
470
471 Discard and Refresh
472 Synopsis:
473
474 R
475
476 Refresh the screen, discarding any buffered input. If the current file
477 is non-seekable, buffered input shall not be discarded and the R com‐
478 mand shall be equivalent to the r command.
479
480 Mark Position
481 Synopsis:
482
483 mletter
484
485 Mark the current position with the letter named by letter, where letter
486 represents the name of one of the lowercase letters of the portable
487 character set. When a new file is examined, all marks may be lost.
488
489 Return to Mark
490 Synopsis:
491
492 'letter
493
494 Return to the position that was previously marked with the letter named
495 by letter, making that line the current position.
496
497 Return to Previous Position
498 Synopsis:
499
500 ''
501
502 Return to the position from which the last large movement command was
503 executed (where a ``large movement'' is defined as any movement of more
504 than a screenful of lines). If no such movements have been made, return
505 to the beginning of the file.
506
507 Search Forward for Pattern
508 Synopsis:
509
510 [count]/[!]pattern<newline>
511
512 Display the screenful beginning with the countth line containing the
513 pattern. The search shall start after the first line currently dis‐
514 played. The null regular expression ('/' followed by a <newline>) shall
515 repeat the search using the previous regular expression, with a default
516 count. If the character '!' is included, the matching lines shall be
517 those that do not contain the pattern. If no match is found for the
518 pattern, a message to that effect shall be displayed.
519
520 Search Backward for Pattern
521 Synopsis:
522
523 [count]?[!]pattern<newline>
524
525 Display the screenful beginning with the countth previous line contain‐
526 ing the pattern. The search shall start on the last line before the
527 first line currently displayed. The null regular expression ('?' fol‐
528 lowed by a <newline>) shall repeat the search using the previous regu‐
529 lar expression, with a default count. If the character '!' is
530 included, matching lines shall be those that do not contain the pat‐
531 tern. If no match is found for the pattern, a message to that effect
532 shall be displayed.
533
534 Repeat Search
535 Synopsis:
536
537 [count]n
538
539 Repeat the previous search for countth line containing the last pattern
540 (or not containing the last pattern, if the previous search was "/!" or
541 "?!").
542
543 Repeat Search in Reverse
544 Synopsis:
545
546 [count]N
547
548 Repeat the search in the opposite direction of the previous search for
549 the countth line containing the last pattern (or not containing the
550 last pattern, if the previous search was "/!" or "?!").
551
552 Examine New File
553 Synopsis:
554
555 :e [filename]<newline>
556
557 Examine a new file. If the filename argument is not specified, the cur‐
558 rent file (see the :n and :p commands below) shall be re-examined. The
559 filename shall be subjected to the process of shell word expansions
560 (see Section 2.6, Word Expansions); if more than a single pathname
561 results, the effects are unspecified. If filename is a <number-sign>
562 ('#'), the previously examined file shall be re-examined. If filename
563 is not accessible for any reason (including that it is a non-seekable
564 file), an error message to this effect shall be displayed and the cur‐
565 rent file and screen shall not change.
566
567 Examine Next File
568 Synopsis:
569
570 [count]:n
571
572 Examine the next file. If a number count is specified, the countth next
573 file shall be examined. If filename refers to a non-seekable file, the
574 results are unspecified.
575
576 Examine Previous File
577 Synopsis:
578
579 [count]:p
580
581 Examine the previous file. If a number count is specified, the countth
582 previous file shall be examined. If filename refers to a non-seekable
583 file, the results are unspecified.
584
585 Go to Tag
586 Synopsis:
587
588 :t tagstring<newline>
589
590 If the file containing the tag named by the tagstring argument is not
591 the current file, examine the file, as if the :e command was executed
592 with that file as the argument. Otherwise, or in addition, display the
593 screenful beginning with the tag, as described for the -t option (see
594 the OPTIONS section). If the ctags utility is not supported by the sys‐
595 tem, the use of :t produces undefined results.
596
597 Invoke Editor
598 Synopsis:
599
600 v
601
602 Invoke an editor to edit the current file being examined. If standard
603 input is being examined, the results are unspecified. The name of the
604 editor shall be taken from the environment variable EDITOR, or shall
605 default to vi. If the last pathname component in EDITOR is either vi
606 or ex, the editor shall be invoked with a -c linenumber command line
607 argument, where linenumber is the line number of the file line contain‐
608 ing the display line currently displayed as the first line of the
609 screen. It is implementation-defined whether line-setting options are
610 passed to editors other than vi and ex.
611
612 When the editor exits, more shall resume with the same file and screen
613 as when the editor was invoked.
614
615 Display Position
616 Synopsis:
617
618 =
619 <control>-G
620
621 Write a message for which the information references the first byte of
622 the line after the last line of the file on the screen. This message
623 shall include the name of the file currently being examined, its number
624 relative to the total number of files there are to examine, the line
625 number in the file, the byte number and the total bytes in the file,
626 and what percentage of the file precedes the current position. If more
627 is reading from standard input, or the file is shorter than a single
628 screen, the line number, the byte number, the total bytes, and the per‐
629 centage need not be written.
630
631 Quit
632 Synopsis:
633
634 q
635 :q
636 ZZ
637
638 Exit more.
639
641 The following exit values shall be returned:
642
643 0 Successful completion.
644
645 >0 An error occurred.
646
648 If an error is encountered accessing a file when using the :n command,
649 more shall attempt to examine the next file in the argument list, but
650 the final exit status shall be affected. If an error is encountered
651 accessing a file via the :p command, more shall attempt to examine the
652 previous file in the argument list, but the final exit status shall be
653 affected. If an error is encountered accessing a file via the :e com‐
654 mand, more shall remain in the current file and the final exit status
655 shall not be affected.
656
657 The following sections are informative.
658
660 When the standard output is not a terminal, only the -s filter-modifi‐
661 cation option is effective. This is based on historical practice. For
662 example, a typical implementation of man pipes its output through more
663 -s to squeeze excess white space for terminal users. When man is piped
664 to lp, however, it is undesirable for this squeezing to happen.
665
667 The -p allows arbitrary commands to be executed at the start of each
668 file. Examples are:
669
670 more -p G file1 file2
671 Examine each file starting with its last screenful.
672
673 more -p 100 file1 file2
674 Examine each file starting with line 100 in the current position
675 (usually the third line, so line 98 would be the first line writ‐
676 ten).
677
678 more -p /100 file1 file2
679 Examine each file starting with the first line containing the
680 string "100" in the current position
681
683 The more utility, available in BSD and BSD-derived systems, was chosen
684 as the prototype for the POSIX file display program since it is more
685 widely available than either the public-domain program less or than pg,
686 a pager provided in System V. The 4.4 BSD more is the model for the
687 features selected; it is almost fully upwards-compatible from the 4.3
688 BSD version in wide use and has become more amenable for vi users. Sev‐
689 eral features originally derived from various file editors, found in
690 both less and pg, have been added to this volume of POSIX.1‐2017 as
691 they have proved extremely popular with users.
692
693 There are inconsistencies between more and vi that result from histori‐
694 cal practice. For example, the single-character commands h, f, b, and
695 <space> are screen movers in more, but cursor movers in vi. These
696 inconsistencies were maintained because the cursor movements are not
697 applicable to more and the powerful functionality achieved without the
698 use of the control key justifies the differences.
699
700 The tags interface has been included in a program that is not a text
701 editor because it promotes another degree of consistent operation with
702 vi. It is conceivable that the paging environment of more would be
703 superior for browsing source code files in some circumstances.
704
705 The operating mode referred to for block-mode terminals effectively
706 adds a <newline> to each Synopsis line that currently has none. So, for
707 example, d<newline> would page one screenful. The mode could be trig‐
708 gered by a command line option, environment variable, or some other
709 method. The details are not imposed by this volume of POSIX.1‐2017
710 because there are so few systems known to support such terminals. Nev‐
711 ertheless, it was considered that all systems should be able to support
712 more given the exception cited for this small community of terminals
713 because, in comparison to vi, the cursor movements are few and the com‐
714 mand set relatively amenable to the optional <newline> characters.
715
716 Some versions of more provide a shell escaping mechanism similar to the
717 ex ! command. The standard developers did not consider that this was
718 necessary in a paginator, particularly given the wide acceptance of
719 multiple window terminals and job control features. (They chose to
720 retain such features in the editors and mailx because the shell inter‐
721 action also gives an opportunity to modify the editing buffer, which is
722 not applicable to more.)
723
724 The -p (position) option replaces the + command because of the Utility
725 Syntax Guidelines. The +command option is no longer specified by
726 POSIX.1‐2008 but may be present in some implementations. In early pro‐
727 posals, it took a pattern argument, but historical less provided the
728 more general facility of a command. It would have been desirable to use
729 the same -c as ex and vi, but the letter was already in use.
730
731 The text stating ``from a non-rewindable stream ... implementations may
732 limit the amount of backwards motion supported'' would allow an imple‐
733 mentation that permitted no backwards motion beyond text already on the
734 screen. It was not possible to require a minimum amount of backwards
735 motion that would be effective for all conceivable device types. The
736 implementation should allow the user to back up as far as possible,
737 within device and reasonable memory allocation constraints.
738
739 Historically, non-printable characters were displayed using the ARPA
740 standard mappings, which are as follows:
741
742 1. Printable characters are left alone.
743
744 2. Control characters less than \177 are represented as followed by
745 the character offset from the '@' character in the ASCII map; for
746 example, \007 is represented as 'G'.
747
748 3. \177 is represented as followed by '?'.
749
750 The display of characters having their eighth bit set was less stan‐
751 dard. Existing implementations use hex (0x00), octal (\000), and a
752 meta-bit display. (The latter displayed characters with their eighth
753 bit set as the two characters "M-", followed by the seven-bit display
754 as described previously.) The latter probably has the best claim to
755 historical practice because it was used with the -v option of 4 BSD and
756 4 BSD-derived versions of the cat utility since 1980.
757
758 No specific display format is required by POSIX.1‐2008. Implementations
759 are encouraged to conform to historic practice in the absence of any
760 strong reason to diverge.
761
763 None.
764
766 Chapter 2, Shell Command Language, ctags, ed, ex, vi
767
768 The Base Definitions volume of POSIX.1‐2017, Chapter 8, Environment
769 Variables, Section 9.2, Regular Expression General Requirements, Sec‐
770 tion 9.3, Basic Regular Expressions, Section 12.2, Utility Syntax
771 Guidelines
772
774 Portions of this text are reprinted and reproduced in electronic form
775 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
776 table Operating System Interface (POSIX), The Open Group Base Specifi‐
777 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
778 Electrical and Electronics Engineers, Inc and The Open Group. In the
779 event of any discrepancy between this version and the original IEEE and
780 The Open Group Standard, the original IEEE and The Open Group Standard
781 is the referee document. The original Standard can be obtained online
782 at http://www.opengroup.org/unix/online.html .
783
784 Any typographical or formatting errors that appear in this page are
785 most likely to have been introduced during the conversion of the source
786 files to man page format. To report such errors, see https://www.ker‐
787 nel.org/doc/man-pages/reporting_bugs.html .
788
789
790
791IEEE/The Open Group 2017 MORE(1P)