1MORE(1P)                   POSIX Programmer's Manual                  MORE(1P)
2
3
4

PROLOG

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

NAME

12       more - display files on a page-by-page basis
13

SYNOPSIS

15       more [-ceisu][-n number][-p command][-t tagstring][file ...]
16

DESCRIPTION

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>s
44
45        * Shall  not  affect users on the capable terminals from using more as
46          described in this volume of IEEE Std 1003.1-2001
47

OPTIONS

49       The more utility shall  conform  to  the  Base  Definitions  volume  of
50       IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
51
52       The following options shall be supported:
53
54       -c     If  a  screen  is to be written that has no lines in common with
55              the current screen, or more is writing its  first  screen,  more
56              shall  not scroll the screen, but instead shall redraw each line
57              of the screen in turn, from the top of the screen to the bottom.
58              In  addition,  if  more  is writing its first screen, the screen
59              shall be cleared. This option may be silently ignored on devices
60              with insufficient terminal capabilities.
61
62       -e     By  default,  more shall exit immediately after writing the last
63              line of the last file in the argument list. If the -e option  is
64              specified:
65
66               1. If there is only a single file in the argument list and that
67                  file was completely displayed on a single screen, more shall
68                  exit immediately after writing the last line of that file.
69
70               2. Otherwise,  more  shall exit only after reaching end-of-file
71                  on the last file in  the  argument  list  twice  without  an
72                  intervening operation. See the EXTENDED DESCRIPTION section.
73
74       -i     Perform pattern matching in searches without regard to case; see
75              the Base Definitions  volume  of  IEEE Std 1003.1-2001,  Section
76              9.2, Regular Expression General Requirements.
77
78       -n  number
79              Specify  the  number of lines per screenful. The number argument
80              is a positive decimal integer. The -n option shall override  any
81              values obtained from any other source.
82
83       -p  command
84              Each  time  a screen from a new file is displayed or redisplayed
85              (including as a result of more commands; for example, :p),  exe‐
86              cute  the  more command(s) in the command arguments in the order
87              specified, as if entered by the user after the first screen  has
88              been displayed. No intermediate results shall be displayed (that
89              is, if the command is a movement to a screen different from  the
90              normal  first screen, only the screen resulting from the command
91              shall be displayed.) If any of the commands fail for any reason,
92              an informational message to this effect shall be written, and no
93              further commands specified using the -p option shall be executed
94              for this file.
95
96       -s     Behave as if consecutive empty lines were a single empty line.
97
98       -t  tagstring
99              Write  the screenful of the file containing the tag named by the
100              tagstring argument. See the ctags utility. The tags feature rep‐
101              resented  by  -t  tagstring  and  the :t command is optional. It
102              shall be provided on any system that also provides a  conforming
103              implementation of ctags; otherwise, the use of -t produces unde‐
104              fined results.
105
106       The filename resulting from the -t option shall be logically added as a
107       prefix  to the list of command line files, as if specified by the user.
108       If the tag named by the tagstring argument is not found, it shall be an
109       error, and more shall take no further action.
110
111       If the tag specifies a line number, the first line of the display shall
112       contain the beginning of that line. If the tag specifies a pattern, the
113       first  line  of the display shall contain the beginning of the matching
114       text from the first line of the file that contains that pattern. If the
115       line  does  not  exist  in  the  file or matching text is not found, an
116       informational message to this effect shall be displayed, and more shall
117       display the default screen as if -t had not been specified.
118
119       If  both  the  -t  tagstring  and  -p command options are given, the -t
120       tagstring shall be processed first; that is, the file and starting line
121       for  the display shall be as specified by -t, and then the -p more com‐
122       mand shall be executed. If the line (matching text) specified by the -t
123       command does not exist (is not found), no -p more command shall be exe‐
124       cuted for this file at any time.
125
126       -u     Treat a <backspace> as a printable control character,  displayed
127              as   an   implementation-defined  character  sequence  (see  the
128              EXTENDED DESCRIPTION section), suppressing backspacing  and  the
129              special  handling that produces underlined or standout mode text
130              on some terminal types. Also, do not ignore a  <carriage-return>
131              at the end of a line.
132
133

OPERANDS

135       The following operand shall be supported:
136
137       file   A  pathname of an input file. If no file operands are specified,
138              the standard input shall be used. If a file is '-', the standard
139              input shall be read at that point in the sequence.
140
141

STDIN

143       The  standard  input  shall be used only if no file operands are speci‐
144       fied, or if a file operand is '-' .
145

INPUT FILES

147       The input files being examined shall be text files. If standard  output
148       is  a  terminal, standard error shall be used to read commands from the
149       user. If standard output is a terminal, standard error is not readable,
150       and  command  input is needed, more may attempt to obtain user commands
151       from the controlling terminal (for example, /dev/tty); otherwise,  more
152       shall  terminate  with  an  error indicating that it was unable to read
153       user commands. If standard output is not a  terminal,  no  error  shall
154       result if standard error cannot be opened for reading.
155

ENVIRONMENT VARIABLES

157       The following environment variables shall affect the execution of more:
158
159       COLUMNS
160              Override  the  system-selected horizontal display line size. See
161              the Base Definitions volume of IEEE Std 1003.1-2001, Chapter  8,
162              Environment  Variables  for  valid values and results when it is
163              unset or null.
164
165       EDITOR Used by the v command to select  an  editor.  See  the  EXTENDED
166              DESCRIPTION section.
167
168       LANG   Provide  a  default value for the internationalization variables
169              that are unset or null. (See  the  Base  Definitions  volume  of
170              IEEE Std 1003.1-2001,  Section  8.2,  Internationalization Vari‐
171              ables for the precedence of internationalization variables  used
172              to determine the values of locale categories.)
173
174       LC_ALL If  set  to a non-empty string value, override the values of all
175              the other internationalization variables.
176
177       LC_COLLATE
178
179              Determine the locale for the  behavior  of  ranges,  equivalence
180              classes,  and  multi-character collating elements within regular
181              expressions.
182
183       LC_CTYPE
184              Determine the locale for  the  interpretation  of  sequences  of
185              bytes  of  text  data as characters (for example, single-byte as
186              opposed to multi-byte characters in arguments and  input  files)
187              and  the  behavior  of  character classes within regular expres‐
188              sions.
189
190       LC_MESSAGES
191              Determine the locale that should be used to  affect  the  format
192              and  contents  of  diagnostic messages written to standard error
193              and informative messages written to standard output.
194
195       NLSPATH
196              Determine the location of message catalogs for the processing of
197              LC_MESSAGES .
198
199       LINES  Override  the  system-selected vertical screen size, used as the
200              number of lines in a screenful. See the Base Definitions  volume
201              of  IEEE Std 1003.1-2001,  Chapter  8, Environment Variables for
202              valid values and results when it is unset or null. The -n option
203              shall  take  precedence  over the LINES variable for determining
204              the number of lines in a screenful.
205
206       MORE   Determine a string containing options described in  the  OPTIONS
207              section  preceded  with  hyphens and <blank>-separated as on the
208              command line. Any command line options shall be processed  after
209              those in the MORE variable, as if the command line were:
210
211
212              more $MORE options operands
213
214       The  MORE  variable shall take precedence over the TERM and LINES vari‐
215       ables for determining the number of lines in a screenful.
216
217       TERM   Determine the name of the terminal type.  If  this  variable  is
218              unset or null, an unspecified default terminal type is used.
219
220

ASYNCHRONOUS EVENTS

222       Default.
223

STDOUT

225       The  standard  output  shall be used to write the contents of the input
226       files.
227

STDERR

229       The standard error shall be used for diagnostic messages and user  com‐
230       mands  (see the INPUT FILES section), and, if standard output is a ter‐
231       minal device, to write a prompting string. The prompting  string  shall
232       appear  on the screen line below the last line of the file displayed in
233       the current screenful. The prompt shall contain the name  of  the  file
234       currently  being  examined  and shall contain an end-of-file indication
235       and the name of the next file, if any, when prompting  at  the  end-of-
236       file. If an error or informational message is displayed, it is unspeci‐
237       fied whether it is contained in the prompt. If it is not  contained  in
238       the  prompt,  it shall be displayed and then the user shall be prompted
239       for a continuation character, at which point  another  message  or  the
240       user  prompt  may be displayed. The prompt is otherwise unspecified. It
241       is unspecified whether informational messages  are  written  for  other
242       user commands.
243

OUTPUT FILES

245       None.
246

EXTENDED DESCRIPTION

248       The  following section describes the behavior of more when the standard
249       output is a terminal device. If the standard output is not  a  terminal
250       device,  no  options other than -s shall have any effect, and all input
251       files shall be copied to standard output otherwise unmodified, at which
252       time more shall exit without further action.
253
254       The  number of lines available per screen shall be determined by the -n
255       option, if present, or by examining values in the environment (see  the
256       ENVIRONMENT  VARIABLES  section). If neither method yields a number, an
257       unspecified number of lines shall be used.
258
259       The maximum number of lines written shall be one less than this number,
260       because  the  screen  line after the last line written shall be used to
261       write a user prompt and user input. If  the  number  of  lines  in  the
262       screen  is  less than two, the results are undefined. It is unspecified
263       whether user input is permitted to be longer than the remainder of  the
264       single line where the prompt has been written.
265
266       The number of columns available per line shall be determined by examin‐
267       ing values in the environment (see the ENVIRONMENT VARIABLES  section),
268       with  a  default  value  as described in the Base Definitions volume of
269       IEEE Std 1003.1-2001, Chapter 8, Environment Variables.
270
271       Lines that are longer than the display shall be folded; the  length  at
272       which  folding occurs is unspecified, but should be appropriate for the
273       output device. Folding may occur between glyphs  of  single  characters
274       that take up multiple display columns.
275
276       When  standard output is a terminal and -u is not specified, more shall
277       treat <backspace>s and <carriage-return>s specially:
278
279        * A character, followed first by a sequence of n <backspace>s (where n
280          is  the  same  as  the number of column positions that the character
281          occupies), then by n underscore characters ( '_' ), shall cause that
282          character  to  be  written  as underlined text, if the terminal type
283          supports that. The n underscore  characters,  followed  first  by  n
284          <backspace>s, then any character with n column positions, shall also
285          cause that character to be written as underlined text, if the termi‐
286          nal type supports that.
287
288        * A  sequence  of n <backspace>s (where n is the same as the number of
289          column positions that the previous character occupies) that  appears
290          between  two identical printable characters shall cause the first of
291          those two characters to be written as emboldened text (that is, vis‐
292          ually brighter, standout mode, or inverse-video mode), if the termi‐
293          nal type supports that, and the second to be discarded.  Immediately
294          subsequent occurrences of <backspace>/ character pairs for that same
295          character shall  also  be  discarded.  (For  example,  the  sequence
296          "a\ba\ba\ba" is interpreted as a single emboldened 'a' .)
297
298        * The more utility shall logically discard all other <backspace>s from
299          the line as well as the character which precedes them, if any.
300
301        * A <carriage-return> at the end of a line shall  be  ignored,  rather
302          than being written as a non-printable character, as described in the
303          next paragraph.
304
305       It is implementation-defined how  other  non-printable  characters  are
306       written.  Implementations  should use the same format that they use for
307       the ex print command; see the OPTIONS section within the ed utility. It
308       is  unspecified  whether a multi-column character shall be separated if
309       it crosses a display line boundary; it  shall  not  be  discarded.  The
310       behavior is unspecified if the number of columns on the display is less
311       than the number of columns any single character in the line being  dis‐
312       played would occupy.
313
314       When  each new file is displayed (or redisplayed), more shall write the
315       first screen of the file. Once the initial  screen  has  been  written,
316       more shall prompt for a user command. If the execution of the user com‐
317       mand results in a screen that has lines  in  common  with  the  current
318       screen, and the device has sufficient terminal capabilities, more shall
319       scroll the screen; otherwise, it is unspecified whether the  screen  is
320       scrolled or redrawn.
321
322       For  all  files  but  the last (including standard input if no file was
323       specified, and for the last file as well, if  the  -e  option  was  not
324       specified), when more has written the last line in the file, more shall
325       prompt for a user command.  This prompt shall contain the name  of  the
326       next  file  as well as an indication that more has reached end-of-file.
327       If the user command is f, <control>-F, <space>, j, <newline>, d,  <con‐
328       trol>-D, or s, more shall display the next file. Otherwise, if display‐
329       ing the last file, more shall exit. Otherwise, more shall  execute  the
330       user command specified.
331
332       Several  of  the  commands described in this section display a previous
333       screen from the input stream. In the case that text is being taken from
334       a  non-rewindable  stream, such as a pipe, it is implementation-defined
335       how much backwards motion is supported. If a command cannot be executed
336       because  of  a limitation on backwards motion, an error message to this
337       effect shall be displayed, the current screen shall not change, and the
338       user shall be prompted for another command.
339
340       If  a  command cannot be performed because there are insufficient lines
341       to display, more shall alert the terminal. If a command cannot be  per‐
342       formed  because  there are insufficient lines to display or a / command
343       fails: if the input is the standard input, the last screen in the  file
344       may  be  displayed;  otherwise,  the  current file and screen shall not
345       change, and the user shall be prompted for another command.
346
347       The interactive commands in the following sections shall be  supported.
348       Some commands can be preceded by a decimal integer, called count in the
349       following descriptions. If not specified with the command, count  shall
350       default to 1. In the following descriptions, pattern is a basic regular
351       expression,  as  described  in   the   Base   Definitions   volume   of
352       IEEE Std 1003.1-2001,  Section 9.3, Basic Regular Expressions. The term
353       "examine" is historical usage meaning "open the file for viewing''; for
354       example, more foo would be expressed as examining file foo.
355
356       In  the  following  descriptions, unless otherwise specified, line is a
357       line in the more display, not a line from the file being examined.
358
359       In the following descriptions,  the  current  position  refers  to  two
360       things:
361
362        1. The position of the current line on the screen
363
364        2. The line number (in the file) of the current line on the screen
365
366       Usually,  the  line on the screen corresponding to the current position
367       is the third line on the screen. If this is  not  possible  (there  are
368       fewer  than  three  lines  to  display or this is the first page of the
369       file, or it is the last page of the file), then the current position is
370       either the first or last line on the screen as described later.
371
372   Help
373       Synopsis:
374
375
376              h
377
378
379       Write a summary of these commands and other implementation-defined com‐
380       mands. The behavior shall be as if the more utility were executed  with
381       the  -e  option  on  a file that contained the summary information. The
382       user shall be prompted as described earlier in this section  when  end-
383       of-file  is  reached.  If the user command is one of those specified to
384       continue to the next file, more shall return to  the  file  and  screen
385       state from which the h command was executed.
386
387   Scroll Forward One Screenful
388       Synopsis:
389
390
391              [count]f
392              [count]<control>-F
393
394
395       Scroll  forward count lines, with a default of one screenful.  If count
396       is more than the screen size, only the final screenful shall  be  writ‐
397       ten.
398
399   Scroll Backward One Screenful
400       Synopsis:
401
402
403              [count]b
404              [count]<control>-B
405
406
407       Scroll  backward  count lines, with a default of one screenful (see the
408       -n option). If count is more than  the  screen  size,  only  the  final
409       screenful shall be written.
410
411   Scroll Forward One Line
412       Synopsis:
413
414
415              [count]<space>
416              [count]j
417              [count]<newline>
418
419
420       Scroll  forward count lines. The default count for the <space> shall be
421       one screenful; for j and <newline>, one line. The  entire  count  lines
422       shall be written, even if count is more than the screen size.
423
424   Scroll Backward One Line
425       Synopsis:
426
427
428              [count]k
429
430
431       Scroll  backward  count lines. The entire count lines shall be written,
432       even if count is more than the screen size.
433
434   Scroll Forward One Half Screenful
435       Synopsis:
436
437
438              [count]d
439              [count]<control>-D
440
441
442       Scroll forward count lines, with a default of one half  of  the  screen
443       size. If count is specified, it shall become the new default for subse‐
444       quent d, <control>-D, and u commands.
445
446   Skip Forward One Line
447       Synopsis:
448
449
450              [count]s
451
452
453       Display the screenful beginning with the line  count  lines  after  the
454       last line on the current screen. If count would cause the current posi‐
455       tion to be such that less than one screenful would be written, the last
456       screenful in the file shall be written.
457
458   Scroll Backward One Half Screenful
459       Synopsis:
460
461
462              [count]u
463              [count]<control>-U
464
465
466       Scroll  backward  count lines, with a default of one half of the screen
467       size. If count is specified, it shall become the new default for subse‐
468       quent  d,  <control>-D,  u,  and <control>-U commands. The entire count
469       lines shall be written, even if count is more than the screen size.
470
471   Go to Beginning of File
472       Synopsis:
473
474
475              [count]g
476
477
478       Display the screenful beginning with line count.
479
480   Go to End-of-File
481       Synopsis:
482
483
484              [count]G
485
486
487       If count is specified, display the screenful beginning  with  the  line
488       count. Otherwise, display the last screenful of the file.
489
490   Refresh the Screen
491       Synopsis:
492
493
494              r
495              <control>-L
496
497
498       Refresh the screen.
499
500   Discard and Refresh
501       Synopsis:
502
503
504              R
505
506
507       Refresh  the screen, discarding any buffered input. If the current file
508       is non-seekable, buffered input shall not be discarded and the  R  com‐
509       mand shall be equivalent to the r command.
510
511   Mark Position
512       Synopsis:
513
514
515              mletter
516
517
518       Mark the current position with the letter named by letter, where letter
519       represents the name of one of the lowercase  letters  of  the  portable
520       character set. When a new file is examined, all marks may be lost.
521
522   Return to Mark
523       Synopsis:
524
525
526              'letter
527
528
529       Return to the position that was previously marked with the letter named
530       by letter, making that line the current position.
531
532   Return to Previous Position
533       Synopsis:
534
535
536              ''
537
538
539       Return to the position from which the last large movement  command  was
540       executed  (where  a "large movement" is defined as any movement of more
541       than a screenful of lines). If no such movements have been made, return
542       to the beginning of the file.
543
544   Search Forward for Pattern
545       Synopsis:
546
547
548              [count]/[!]pattern<newline>
549
550
551       Display  the  screenful  beginning with the countth line containing the
552       pattern. The search shall start after the  first  line  currently  dis‐
553       played.  The  null  regular  expression  ( '/' followed by a <newline>)
554       shall repeat the search using the previous regular expression,  with  a
555       default  count.  If  the  character '!' is included, the matching lines
556       shall be those that do not contain the pattern. If no  match  is  found
557       for the pattern, a message to that effect shall be displayed.
558
559   Search Backward for Pattern
560       Synopsis:
561
562
563              [count]?[!]pattern<newline>
564
565
566       Display the screenful beginning with the countth previous line contain‐
567       ing the pattern. The search shall start on the  last  line  before  the
568       first  line currently displayed. The null regular expression ( '?' fol‐
569       lowed by a <newline>) shall repeat the search using the previous  regu‐
570       lar expression, with a default count. If the character '!' is included,
571       matching lines shall be those that do not contain the pattern.   If  no
572       match  is found for the pattern, a message to that effect shall be dis‐
573       played.
574
575   Repeat Search
576       Synopsis:
577
578
579              [count]n
580
581
582       Repeat the previous search for countth line containing the last pattern
583       (or not containing the last pattern, if the previous search was "/!" or
584       "?!"  ).
585
586   Repeat Search in Reverse
587       Synopsis:
588
589
590              [count]N
591
592
593       Repeat the search in the opposite direction of the previous search  for
594       the  countth  line  containing  the last pattern (or not containing the
595       last pattern, if the previous search was "/!" or "?!" ).
596
597   Examine New File
598       Synopsis:
599
600
601              :e [filename]<newline>
602
603
604       Examine a new file. If the filename argument is not specified, the cur‐
605       rent  file (see the :n and :p commands below) shall be re-examined. The
606       filename shall be subjected to the process  of  shell  word  expansions
607       (see  Word  Expansions  );  if more than a single pathname results, the
608       effects are unspecified.  If filename is a number sign  (  '#'  ),  the
609       previously  examined  file  shall  be  re-examined.  If filename is not
610       accessible for any reason (including that it is a  non-seekable  file),
611       an error message to this effect shall be displayed and the current file
612       and screen shall not change.
613
614   Examine Next File
615       Synopsis:
616
617
618              [count]:n
619
620
621       Examine the next file. If a number count is specified, the countth next
622       file  shall be examined. If filename refers to a non-seekable file, the
623       results are unspecified.
624
625   Examine Previous File
626       Synopsis:
627
628
629              [count]:p
630
631
632       Examine the previous file. If a number count is specified, the  countth
633       previous  file  shall be examined. If filename refers to a non-seekable
634       file, the results are unspecified.
635
636   Go to Tag
637       Synopsis:
638
639
640              :t tagstring<newline>
641
642
643       If the file containing the tag named by the tagstring argument  is  not
644       the  current  file, examine the file, as if the :e command was executed
645       with that file as the argument. Otherwise, or in addition, display  the
646       screenful  beginning  with the tag, as described for the -t option (see
647       the OPTIONS section).  If the ctags utility is  not  supported  by  the
648       system, the use of :t produces undefined results.
649
650   Invoke Editor
651       Synopsis:
652
653
654              v
655
656
657       Invoke  an  editor to edit the current file being examined. If standard
658       input is being examined, the results are unspecified. The name  of  the
659       editor  shall  be taken from the environment variable EDITOR , or shall
660       default to vi. If the last pathname component in EDITOR is either vi or
661       ex, the editor shall be invoked with a -c linenumber command line argu‐
662       ment, where linenumber is the line number of the file  line  containing
663       the  display  line currently displayed as the first line of the screen.
664       It is implementation-defined whether line-setting options are passed to
665       editors other than vi and ex.
666
667       When  the editor exits, more shall resume with the same file and screen
668       as when the editor was invoked.
669
670   Display Position
671       Synopsis:
672
673
674              =
675              <control>-G
676
677
678       Write a message for which the information references the first byte  of
679       the  line  after the last line of the file on the screen.  This message
680       shall include the name of the file currently being examined, its number
681       relative  to  the  total number of files there are to examine, the line
682       number in the file, the byte number and the total bytes  in  the  file,
683       and  what percentage of the file precedes the current position. If more
684       is reading from standard input, or the file is shorter  than  a  single
685       screen, the line number, the byte number, the total bytes, and the per‐
686       centage need not be written.
687
688   Quit
689       Synopsis:
690
691
692              q
693              :q
694              ZZ
695
696
697       Exit more.
698

EXIT STATUS

700       The following exit values shall be returned:
701
702        0     Successful completion.
703
704       >0     An error occurred.
705
706

CONSEQUENCES OF ERRORS

708       If an error is encountered accessing a file when using the :n  command,
709       more  shall  attempt to examine the next file in the argument list, but
710       the final exit status shall be affected.  If an  error  is  encountered
711       accessing  a file via the :p command, more shall attempt to examine the
712       previous file in the argument list, but the final exit status shall  be
713       affected.   If an error is encountered accessing a file via the :e com‐
714       mand, more shall remain in the current file and the final  exit  status
715       shall not be affected.
716
717       The following sections are informative.
718

APPLICATION USAGE

720       When  the standard output is not a terminal, only the -s filter-modifi‐
721       cation option is effective. This is based on historical  practice.  For
722       example,  a typical implementation of man pipes its output through more
723       -s to squeeze excess white space for terminal users. When man is  piped
724       to lp, however, it is undesirable for this squeezing to happen.
725

EXAMPLES

727       The  -p  allows  arbitrary commands to be executed at the start of each
728       file. Examples are:
729
730       more  -p G  file1 file2
731
732              Examine each file starting with its last screenful.
733
734       more  -p  100 file1 file2
735
736              Examine each file starting with line 100 in the current position
737              (usually  the  third  line,  so  line 98 would be the first line
738              written).
739
740       more  -p  /100 file1 file2
741
742              Examine each file starting with the first  line  containing  the
743              string "100" in the current position
744
745

RATIONALE

747       The  more utility, available in BSD and BSD-derived systems, was chosen
748       as the prototype for the POSIX file display program since  it  is  more
749       widely available than either the public-domain program less or than pg,
750       a pager provided in System V. The 4.4 BSD more is  the  model  for  the
751       features  selected;  it is almost fully upwards-compatible from the 4.3
752       BSD version in wide use and has become  more  amenable  for  vi  users.
753       Several features originally derived from various file editors, found in
754       both   less   and   pg,   have   been   added   to   this   volume   of
755       IEEE Std 1003.1-2001 as they have proved extremely popular with users.
756
757       There are inconsistencies between more and vi that result from histori‐
758       cal practice. For example, the single-character commands h, f,  b,  and
759       <space>  are  screen  movers  in  more,  but cursor movers in vi. These
760       inconsistencies were maintained because the cursor  movements  are  not
761       applicable  to more and the powerful functionality achieved without the
762       use of the control key justifies the differences.
763
764       The tags interface has been included in a program that is  not  a  text
765       editor  because it promotes another degree of consistent operation with
766       vi. It is conceivable that the paging  environment  of  more  would  be
767       superior for browsing source code files in some circumstances.
768
769       The  operating  mode  referred  to for block-mode terminals effectively
770       adds a <newline> to each Synopsis line that currently has none. So, for
771       example, d <newline> would page one screenful.  The mode could be trig‐
772       gered by a command line option, environment  variable,  or  some  other
773       method.   The   details   are   not   imposed   by   this   volume   of
774       IEEE Std 1003.1-2001 because there are so few systems known to  support
775       such terminals. Nevertheless, it was considered that all systems should
776       be able to support more given the exception cited for this small commu‐
777       nity  of  terminals  because, in comparison to vi, the cursor movements
778       are few and the command set relatively amenable to the  optional  <new‐
779       line>s.
780
781       Some versions of more provide a shell escaping mechanism similar to the
782       ex ! command. The standard developers did not consider  that  this  was
783       necessary  in  a  paginator,  particularly given the wide acceptance of
784       multiple window terminals and job control  features.   (They  chose  to
785       retain  such features in the editors and mailx because the shell inter‐
786       action also gives an opportunity to modify the editing buffer, which is
787       not applicable to more.)
788
789       The  -p (position) option replaces the + command because of the Utility
790       Syntax Guidelines. In early proposals, it took a pattern argument,  but
791       historical  less  provided  the  more general facility of a command. It
792       would have been desirable to use the same -c as ex and vi, but the let‐
793       ter was already in use.
794
795       The  text stating "from a non-rewindable stream ... implementations may
796       limit the amount of backwards motion supported" would allow  an  imple‐
797       mentation that permitted no backwards motion beyond text already on the
798       screen. It was not possible to require a minimum  amount  of  backwards
799       motion  that  would  be effective for all conceivable device types. The
800       implementation should allow the user to back up  as  far  as  possible,
801       within device and reasonable memory allocation constraints.
802
803       Historically,  non-printable  characters  were displayed using the ARPA
804       standard mappings, which are as follows:
805
806        1. Printable characters are left alone.
807
808        2. Control characters less than \177 are represented  as  followed  by
809           the  character  offset from the '@' character in the ASCII map; for
810           example, \007 is represented as 'G' .
811
812        3. \177 is represented as followed by '?' .
813
814       The display of characters having their eighth bit set  was  less  stan‐
815       dard.   Existing  implementations  use  hex (0x00), octal (\000), and a
816       meta-bit display. (The latter displayed characters  with  their  eighth
817       bit  set  as the two characters "M-", followed by the seven-bit display
818       as described previously.) The latter probably has  the  best  claim  to
819       historical practice because it was used with the -v option of 4 BSD and
820       4 BSD-derived versions of the cat utility since 1980.
821
822       No specific display format is required by IEEE Std 1003.1-2001.  Imple‐
823       mentations  are  encouraged  to  conform  to  historic  practice in the
824       absence of any strong reason to diverge.
825

FUTURE DIRECTIONS

827       None.
828

SEE ALSO

830       Shell Command Language, ctags, ed, ex, vi
831
833       Portions of this text are reprinted and reproduced in  electronic  form
834       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
835       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
836       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
837       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
838       event of any discrepancy between this version and the original IEEE and
839       The Open Group Standard, the original IEEE and The Open Group  Standard
840       is  the  referee document. The original Standard can be obtained online
841       at http://www.opengroup.org/unix/online.html .
842
843
844
845IEEE/The Open Group                  2003                             MORE(1P)
Impressum