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

NAME

6       more - display files on a page-by-page basis
7

SYNOPSIS

9       more [-ceisu][-n number][-p command][-t tagstring][file ...]
10

DESCRIPTION

12       The more utility shall read files and either write them to the terminal
13       on a page-by-page basis or filter them to standard output. If  standard
14       output  is  not  a  terminal device, all input files shall be copied to
15       standard output in their  entirety,  without  modification,  except  as
16       specified  for the -s option.  If standard output is a terminal device,
17       the files shall be written a number of lines (one screenful) at a  time
18       under  the  control of user commands. See the EXTENDED DESCRIPTION sec‐
19       tion.
20
21       Certain block-mode terminals do not have all the capabilities necessary
22       to  support the complete more definition; they are incapable of accept‐
23       ing commands that are not terminated with a <newline>.  Implementations
24       that  support such terminals shall provide an operating mode to more in
25       which all commands can be terminated with a <newline> on  those  termi‐
26       nals. This mode:
27
28        * Shall be documented in the system documentation
29
30        * Shall,  at  invocation,  inform  the user of the terminal deficiency
31          that requires the <newline> usage and provide  instructions  on  how
32          this warning can be suppressed in future invocations
33
34        * Shall  not  be  required  for  implementations supporting only fully
35          capable terminals
36
37        * Shall not affect commands already requiring <newline>s
38
39        * Shall not affect users on the capable terminals from using  more  as
40          described in this volume of IEEE Std 1003.1-2001
41

OPTIONS

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

OPERANDS

129       The following operand shall be supported:
130
131       file   A pathname of an input file. If no file operands are  specified,
132              the  standard  input shall be used. If a file is '-' , the stan‐
133              dard input shall be read at that point in the sequence.
134
135

STDIN

137       The standard input shall be used only if no file  operands  are  speci‐
138       fied, or if a file operand is '-' .
139

INPUT FILES

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

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

216       Default.
217

STDOUT

219       The standard output shall be used to write the contents  of  the  input
220       files.
221

STDERR

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

OUTPUT FILES

239       None.
240

EXTENDED DESCRIPTION

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

EXIT STATUS

694       The following exit values shall be returned:
695
696        0     Successful completion.
697
698       >0     An error occurred.
699
700

CONSEQUENCES OF ERRORS

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

APPLICATION USAGE

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

EXAMPLES

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

RATIONALE

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

FUTURE DIRECTIONS

821       None.
822

SEE ALSO

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