MORE(1)                    POSIX Programmer's Manual                   MORE(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.


NNAAMMEE
       more -- display files on a page-by-page basis

SSYYNNOOPPSSIISS
       more [[-ceisu]] [[-n _n_u_m_b_e_r]] [[-p _c_o_m_m_a_n_d]] [[-t _t_a_g_s_t_r_i_n_g]] [[_f_i_l_e...]]

DDEESSCCRRIIPPTTIIOONN
       The _m_o_r_e utility shall read files and either write them to the terminal
       on a page-by-page basis or filter them to standard output. If standard
       output is not a terminal device, all input files shall be copied to
       standard output in their entirety, without modification, except as
       specified for the --ss option. If standard output is a terminal device,
       the files shall be written a number of lines (one screenful) at a time
       under the control of user commands. See the EXTENDED DESCRIPTION
       section.

       Certain block-mode terminals do not have all the capabilities necessary
       to support the complete _m_o_r_e definition; they are incapable of
       accepting commands that are not terminated with a <newline>.
       Implementations that support such terminals shall provide an operating
       mode to _m_o_r_e in which all commands can be terminated with a <newline>
       on those terminals. This mode:

        *  Shall be documented in the system documentation

        *  Shall, at invocation, inform the user of the terminal deficiency
           that requires the <newline> usage and provide instructions on how
           this warning can be suppressed in future invocations

        *  Shall not be required for implementations supporting only fully
           capable terminals

        *  Shall not affect commands already requiring <newline> characters

        *  Shall not affect users on the capable terminals from using _m_o_r_e as
           described in this volume of POSIX.1-2008

OOPPTTIIOONNSS
       The _m_o_r_e utility shall conform to the Base Definitions volume of
       POSIX.1-2008, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s, except that ''++''
       may be recognized as an option delimiter as well as ''--''.

       The following options shall be supported:

       --cc        If a screen is to be written that has no lines in common with
                 the current screen, or _m_o_r_e is writing its first screen, _m_o_r_e
                 shall not scroll the screen, but instead shall redraw each
                 line of the screen in turn, from the top of the screen to the
                 bottom. In addition, if _m_o_r_e is writing its first screen, the
                 screen shall be cleared. This option may be silently ignored
                 on devices with insufficient terminal capabilities.

       --ee        Exit immediately after writing the last line of the last file
                 in the argument list; see the EXTENDED DESCRIPTION section.

       --ii        Perform pattern matching in searches without regard to case;
                 see the Base Definitions volume of POSIX.1-2008, _S_e_c_t_i_o_n _9_._2,
                 _R_e_g_u_l_a_r _E_x_p_r_e_s_s_i_o_n _G_e_n_e_r_a_l _R_e_q_u_i_r_e_m_e_n_t_s.

       --nn _n_u_m_b_e_r Specify the number of lines per screenful. The _n_u_m_b_e_r
                 argument is a positive decimal integer. The --nn option shall
                 override any values obtained from any other source.

       --pp _c_o_m_m_a_n_d
                 Each time a screen from a new file is displayed or
                 redisplayed (including as a result of _m_o_r_e commands; for
                 example, ::pp), execute the _m_o_r_e command(s) in the command
                 arguments in the order specified, as if entered by the user
                 after the first screen has been displayed. No intermediate
                 results shall be displayed (that is, if the command is a
                 movement to a screen different from the normal first screen,
                 only the screen resulting from the command shall be
                 displayed.) If any of the commands fail for any reason, an
                 informational message to this effect shall be written, and no
                 further commands specified using the --pp option shall be
                 executed for this file.

       --ss        Behave as if consecutive empty lines were a single empty
                 line.

       --tt _t_a_g_s_t_r_i_n_g
                 Write the screenful of the file containing the tag named by
                 the _t_a_g_s_t_r_i_n_g argument. See the _c_t_a_g_s utility. The tags
                 feature represented by --tt _t_a_g_s_t_r_i_n_g and the ::tt command is
                 optional. It shall be provided on any system that also
                 provides a conforming implementation of _c_t_a_g_s; otherwise, the
                 use of --tt produces undefined results.

                 The filename resulting from the --tt option shall be logically
                 added as a prefix to the list of command line files, as if
                 specified by the user. If the tag named by the _t_a_g_s_t_r_i_n_g
                 argument is not found, it shall be an error, and _m_o_r_e shall
                 take no further action.

                 If the tag specifies a line number, the first line of the
                 display shall contain the beginning of that line. If the tag
                 specifies a pattern, the first line of the display shall
                 contain the beginning of the matching text from the first
                 line of the file that contains that pattern. If the line does
                 not exist in the file or matching text is not found, an
                 informational message to this effect shall be displayed, and
                 _m_o_r_e shall display the default screen as if --tt had not been
                 specified.

                 If both the --tt _t_a_g_s_t_r_i_n_g and --pp _c_o_m_m_a_n_d options are given,
                 the --tt _t_a_g_s_t_r_i_n_g shall be processed first; that is, the file
                 and starting line for the display shall be as specified by
                 --tt, and then the --pp _m_o_r_e command shall be executed. If the
                 line (matching text) specified by the --tt command does not
                 exist (is not found), no --pp _m_o_r_e command shall be executed
                 for this file at any time.

       --uu        Treat a <backspace> as a printable control character,
                 displayed as an implementation-defined character sequence
                 (see the EXTENDED DESCRIPTION section), suppressing
                 backspacing and the special handling that produces underlined
                 or standout mode text on some terminal types.  Also, do not
                 ignore a <carriage-return> at the end of a line.

OOPPEERRAANNDDSS
       The following operand shall be supported:

       _f_i_l_e      A pathname of an input file. If no _f_i_l_e operands are
                 specified, the standard input shall be used. If a _f_i_l_e is
                 ''--'', the standard input shall be read at that point in the
                 sequence.

SSTTDDIINN
       The standard input shall be used only if no _f_i_l_e operands are
       specified, or if a _f_i_l_e operand is ''--''.

IINNPPUUTT FFIILLEESS
       The input files being examined shall be text files. If standard output
       is a terminal, standard error shall be used to read commands from the
       user. If standard output is a terminal, standard error is not readable,
       and command input is needed, _m_o_r_e may attempt to obtain user commands
       from the controlling terminal (for example, //ddeevv//ttttyy); otherwise, _m_o_r_e
       shall terminate with an error indicating that it was unable to read
       user commands. If standard output is not a terminal, no error shall
       result if standard error cannot be opened for reading.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of _m_o_r_e:

       _C_O_L_U_M_N_S   Override the system-selected horizontal display line size.
                 See the Base Definitions volume of POSIX.1-2008, _C_h_a_p_t_e_r _8,
                 _E_n_v_i_r_o_n_m_e_n_t _V_a_r_i_a_b_l_e_s for valid values and results when it is
                 unset or null.

       _E_D_I_T_O_R    Used by the vv command to select an editor. See the EXTENDED
                 DESCRIPTION section.

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2008, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_O_L_L_A_T_E
                 Determine the locale for the behavior of ranges, equivalence
                 classes, and multi-character collating elements within
                 regular expressions.

       _L_C___C_T_Y_P_E  Determine the locale for the interpretation of sequences of
                 bytes of text data as characters (for example, single-byte as
                 opposed to multi-byte characters in arguments and input
                 files) and the behavior of character classes within regular
                 expressions.

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard error
                 and informative messages written to standard output.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

       _L_I_N_E_S     Override the system-selected vertical screen size, used as
                 the number of lines in a screenful. See the Base Definitions
                 volume of POSIX.1-2008, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t _V_a_r_i_a_b_l_e_s for
                 valid values and results when it is unset or null. The --nn
                 option shall take precedence over the _L_I_N_E_S variable for
                 determining the number of lines in a screenful.

       _M_O_R_E      Determine a string containing options described in the
                 OPTIONS section preceded with <hyphen> characters and
                 <blank>-separated as on the command line. Any command line
                 options shall be processed after those in the _M_O_R_E variable,
                 as if the command line were:

                     mmoorree $$MMOORREE _o_p_t_i_o_n_s _o_p_e_r_a_n_d_s

                 The _M_O_R_E variable shall take precedence over the _T_E_R_M and
                 _L_I_N_E_S variables for determining the number of lines in a
                 screenful.

       _T_E_R_M      Determine the name of the terminal type. If this variable is
                 unset or null, an unspecified default terminal type is used.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       The standard output shall be used to write the contents of the input
       files.

SSTTDDEERRRR
       The standard error shall be used for diagnostic messages and user
       commands (see the INPUT FILES section), and, if standard output is a
       terminal device, to write a prompting string. The prompting string
       shall appear on the screen line below the last line of the file
       displayed in the current screenful. The prompt shall contain the name
       of the file currently being examined and shall contain an end-of-file
       indication and the name of the next file, if any, when prompting at the
       end-of-file. If an error or informational message is displayed, it is
       unspecified whether it is contained in the prompt. If it is not
       contained in the prompt, it shall be displayed and then the user shall
       be prompted for a continuation character, at which point another
       message or the user prompt may be displayed. The prompt is otherwise
       unspecified. It is unspecified whether informational messages are
       written for other user commands.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       The following section describes the behavior of _m_o_r_e when the standard
       output is a terminal device. If the standard output is not a terminal
       device, no options other than --ss shall have any effect, and all input
       files shall be copied to standard output otherwise unmodified, at which
       time _m_o_r_e shall exit without further action.

       The number of lines available per screen shall be determined by the --nn
       option, if present, or by examining values in the environment (see the
       ENVIRONMENT VARIABLES section). If neither method yields a number, an
       unspecified number of lines shall be used.

       The maximum number of lines written shall be one less than this number,
       because the screen line after the last line written shall be used to
       write a user prompt and user input. If the number of lines in the
       screen is less than two, the results are undefined. It is unspecified
       whether user input is permitted to be longer than the remainder of the
       single line where the prompt has been written.

       The number of columns available per line shall be determined by
       examining values in the environment (see the ENVIRONMENT VARIABLES
       section), with a default value as described in the Base Definitions
       volume of POSIX.1-2008, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t _V_a_r_i_a_b_l_e_s.

       Lines that are longer than the display shall be folded; the length at
       which folding occurs is unspecified, but should be appropriate for the
       output device. Folding may occur between glyphs of single characters
       that take up multiple display columns.

       When standard output is a terminal and --uu is not specified, _m_o_r_e shall
       treat <backspace> and <carriage-return> characters specially:

        *  A character, followed first by a sequence of _n <backspace>
           characters (where _n is the same as the number of column positions
           that the character occupies), then by _n <underscore> characters
           (''__''), shall cause that character to be written as underlined text,
           if the terminal type supports that. The _n <underscore> characters,
           followed first by _n <backspace> characters, then any character with
           _n column positions, shall also cause that character to be written
           as underlined text, if the terminal type supports that.

        *  A sequence of _n <backspace> characters (where _n is the same as the
           number of column positions that the previous character occupies)
           that appears between two identical printable characters shall cause
           the first of those two characters to be written as emboldened text
           (that is, visually brighter, standout mode, or inverse-video mode),
           if the terminal type supports that, and the second to be discarded.
           Immediately subsequent occurrences of <backspace>/character pairs
           for that same character shall also be discarded. (For example, the
           sequence ""aa\\bbaa\\bbaa\\bbaa"" is interpreted as a single emboldened ''aa''.)

        *  The _m_o_r_e utility shall logically discard all other <backspace>
           characters from the line as well as the character which precedes
           them, if any.

        *  A <carriage-return> at the end of a line shall be ignored, rather
           than being written as a non-printable character, as described in
           the next paragraph.

       It is implementation-defined how other non-printable characters are
       written. Implementations should use the same format that they use for
       the _e_x pprriinntt command; see the OPTIONS section within the _e_d utility. It
       is unspecified whether a multi-column character shall be separated if
       it crosses a display line boundary; it shall not be discarded. The
       behavior is unspecified if the number of columns on the display is less
       than the number of columns any single character in the line being
       displayed would occupy.

       When each new file is displayed (or redisplayed), _m_o_r_e shall write the
       first screen of the file. Once the initial screen has been written,
       _m_o_r_e shall prompt for a user command. If the execution of the user
       command results in a screen that has lines in common with the current
       screen, and the device has sufficient terminal capabilities, _m_o_r_e shall
       scroll the screen; otherwise, it is unspecified whether the screen is
       scrolled or redrawn.

       For all files but the last (including standard input if no file was
       specified, and for the last file as well, if the --ee option was not
       specified), when _m_o_r_e has written the last line in the file, _m_o_r_e shall
       prompt for a user command. This prompt shall contain the name of the
       next file as well as an indication that _m_o_r_e has reached end-of-file.
       If the user command is ff, <control>-F, <space>, jj, <newline>, dd,
       <control>-D, or ss, _m_o_r_e shall display the next file. Otherwise, if
       displaying the last file, _m_o_r_e shall exit. Otherwise, _m_o_r_e shall
       execute the user command specified.

       Several of the commands described in this section display a previous
       screen from the input stream. In the case that text is being taken from
       a non-rewindable stream, such as a pipe, it is implementation-defined
       how much backwards motion is supported. If a command cannot be executed
       because of a limitation on backwards motion, an error message to this
       effect shall be displayed, the current screen shall not change, and the
       user shall be prompted for another command.

       If a command cannot be performed because there are insufficient lines
       to display, _m_o_r_e shall alert the terminal. If a command cannot be
       performed because there are insufficient lines to display or a //
       command fails: if the input is the standard input, the last screen in
       the file may be displayed; otherwise, the current file and screen shall
       not change, and the user shall be prompted for another command.

       The interactive commands in the following sections shall be supported.
       Some commands can be preceded by a decimal integer, called _c_o_u_n_t in the
       following descriptions. If not specified with the command, _c_o_u_n_t shall
       default to 1. In the following descriptions, _p_a_t_t_e_r_n is a basic regular
       expression, as described in the Base Definitions volume of
       POSIX.1-2008, _S_e_c_t_i_o_n _9_._3, _B_a_s_i_c _R_e_g_u_l_a_r _E_x_p_r_e_s_s_i_o_n_s.  The term
       ``examine'' is historical usage meaning ``open the file for viewing'';
       for example, _m_o_r_e ffoooo would be expressed as examining file ffoooo.

       In the following descriptions, unless otherwise specified, _l_i_n_e is a
       line in the _m_o_r_e display, not a line from the file being examined.

       In the following descriptions, the _c_u_r_r_e_n_t _p_o_s_i_t_i_o_n refers to two
       things:

        1. The position of the current line on the screen

        2. The line number (in the file) of the current line on the screen

       Usually, the line on the screen corresponding to the current position
       is the third line on the screen. If this is not possible (there are
       fewer than three lines to display or this is the first page of the
       file, or it is the last page of the file), then the current position is
       either the first or last line on the screen as described later.

   HHeellpp
       _S_y_n_o_p_s_i_s:
                     hh

       Write a summary of these commands and other implementation-defined
       commands. The behavior shall be as if the _m_o_r_e utility were executed
       with the --ee option on a file that contained the summary information.
       The user shall be prompted as described earlier in this section when
       end-of-file is reached. If the user command is one of those specified
       to continue to the next file, _m_o_r_e shall return to the file and screen
       state from which the hh command was executed.

   SSccrroollll FFoorrwwaarrdd OOnnee SSccrreeeennffuull
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]f
                     [[_c_o_u_n_t]]<control>-F

       Scroll forward _c_o_u_n_t lines, with a default of one screenful. If _c_o_u_n_t
       is more than the screen size, only the final screenful shall be
       written.

   SSccrroollll BBaacckkwwaarrdd OOnnee SSccrreeeennffuull
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]b
                     [[_c_o_u_n_t]]<control>-B

       Scroll backward _c_o_u_n_t lines, with a default of one screenful (see the
       --nn option). If _c_o_u_n_t is more than the screen size, only the final
       screenful shall be written.

   SSccrroollll FFoorrwwaarrdd OOnnee LLiinnee
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]<space>
                     [[_c_o_u_n_t]]j
                     [[_c_o_u_n_t]]<newline>

       Scroll forward _c_o_u_n_t lines. The default _c_o_u_n_t for the <space> shall be
       one screenful; for jj and <newline>, one line. The entire _c_o_u_n_t lines
       shall be written, even if _c_o_u_n_t is more than the screen size.

   SSccrroollll BBaacckkwwaarrdd OOnnee LLiinnee
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]k

       Scroll backward _c_o_u_n_t lines. The entire _c_o_u_n_t lines shall be written,
       even if _c_o_u_n_t is more than the screen size.

   SSccrroollll FFoorrwwaarrdd OOnnee HHaallff SSccrreeeennffuull
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]d
                     [[_c_o_u_n_t]]<control>-D

       Scroll forward _c_o_u_n_t lines, with a default of one half of the screen
       size. If _c_o_u_n_t is specified, it shall become the new default for
       subsequent dd, <control>-D, and uu commands.

   SSkkiipp FFoorrwwaarrdd OOnnee LLiinnee
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]s

       Display the screenful beginning with the line _c_o_u_n_t lines after the
       last line on the current screen. If _c_o_u_n_t would cause the current
       position to be such that less than one screenful would be written, the
       last screenful in the file shall be written.

   SSccrroollll BBaacckkwwaarrdd OOnnee HHaallff SSccrreeeennffuull
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]u
                     [[_c_o_u_n_t]]<control>-U

       Scroll backward _c_o_u_n_t lines, with a default of one half of the screen
       size. If _c_o_u_n_t is specified, it shall become the new default for
       subsequent dd, <control>-D, uu, and <control>-U commands. The entire
       _c_o_u_n_t lines shall be written, even if _c_o_u_n_t is more than the screen
       size.

   GGoo ttoo BBeeggiinnnniinngg ooff FFiillee
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]g

       Display the screenful beginning with line _c_o_u_n_t.

   GGoo ttoo EEnndd--ooff--FFiillee
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]G

       If _c_o_u_n_t is specified, display the screenful beginning with the line
       _c_o_u_n_t.  Otherwise, display the last screenful of the file.

   RReeffrreesshh tthhee SSccrreeeenn
       _S_y_n_o_p_s_i_s:
                     rr
                     <<ccoonnttrrooll>>--LL

       Refresh the screen.

   DDiissccaarrdd aanndd RReeffrreesshh
       _S_y_n_o_p_s_i_s:
                     RR

       Refresh the screen, discarding any buffered input. If the current file
       is non-seekable, buffered input shall not be discarded and the RR
       command shall be equivalent to the rr command.

   MMaarrkk PPoossiittiioonn
       _S_y_n_o_p_s_i_s:
                     mm_l_e_t_t_e_r

       Mark the current position with the letter named by _l_e_t_t_e_r, where _l_e_t_t_e_r
       represents the name of one of the lowercase letters of the portable
       character set. When a new file is examined, all marks may be lost.

   RReettuurrnn ttoo MMaarrkk
       _S_y_n_o_p_s_i_s:
                     ''_l_e_t_t_e_r

       Return to the position that was previously marked with the letter named
       by _l_e_t_t_e_r, making that line the current position.

   RReettuurrnn ttoo PPrreevviioouuss PPoossiittiioonn
       _S_y_n_o_p_s_i_s:
                     ''''

       Return to the position from which the last large movement command was
       executed (where a ``large movement'' is defined as any movement of more
       than a screenful of lines). If no such movements have been made, return
       to the beginning of the file.

   SSeeaarrcchh FFoorrwwaarrdd ffoorr PPaatttteerrnn
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]/[[!]]_p_a_t_t_e_r_n<newline>

       Display the screenful beginning with the _c_o_u_n_tth line containing the
       pattern. The search shall start after the first line currently
       displayed. The null regular expression (''//'' followed by a <newline>)
       shall repeat the search using the previous regular expression, with a
       default _c_o_u_n_t.  If the character ''!!''  is included, the matching lines
       shall be those that do not contain the _p_a_t_t_e_r_n.  If no match is found
       for the _p_a_t_t_e_r_n, a message to that effect shall be displayed.

   SSeeaarrcchh BBaacckkwwaarrdd ffoorr PPaatttteerrnn
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]?[[!]]_p_a_t_t_e_r_n<newline>

       Display the screenful beginning with the _c_o_u_n_tth previous line
       containing the pattern. The search shall start on the last line before
       the first line currently displayed. The null regular expression (''??''
       followed by a <newline>) shall repeat the search using the previous
       regular expression, with a default _c_o_u_n_t.  If the character ''!!''  is
       included, matching lines shall be those that do not contain the
       _p_a_t_t_e_r_n.  If no match is found for the _p_a_t_t_e_r_n, a message to that
       effect shall be displayed.

   RReeppeeaatt SSeeaarrcchh
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]n

       Repeat the previous search for _c_o_u_n_tth line containing the last _p_a_t_t_e_r_n
       (or not containing the last _p_a_t_t_e_r_n, if the previous search was ""//!!"" or
       ""??!!"").

   RReeppeeaatt SSeeaarrcchh iinn RReevveerrssee
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]N

       Repeat the search in the opposite direction of the previous search for
       the _c_o_u_n_tth line containing the last _p_a_t_t_e_r_n (or not containing the
       last _p_a_t_t_e_r_n, if the previous search was ""//!!"" or ""??!!"").

   EExxaammiinnee NNeeww FFiillee
       _S_y_n_o_p_s_i_s:
                     ::ee [[_f_i_l_e_n_a_m_e]]<newline>

       Examine a new file. If the _f_i_l_e_n_a_m_e argument is not specified, the
       current file (see the ::nn and ::pp commands below) shall be re-examined.
       The _f_i_l_e_n_a_m_e shall be subjected to the process of shell word expansions
       (see _S_e_c_t_i_o_n _2_._6, _W_o_r_d _E_x_p_a_n_s_i_o_n_s); if more than a single pathname
       results, the effects are unspecified.  If _f_i_l_e_n_a_m_e is a <number-sign>
       (''##''), the previously examined file shall be re-examined. If _f_i_l_e_n_a_m_e
       is not accessible for any reason (including that it is a non-seekable
       file), an error message to this effect shall be displayed and the
       current file and screen shall not change.

   EExxaammiinnee NNeexxtt FFiillee
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]:n

       Examine the next file. If a number _c_o_u_n_t is specified, the _c_o_u_n_tth next
       file shall be examined. If _f_i_l_e_n_a_m_e refers to a non-seekable file, the
       results are unspecified.

   EExxaammiinnee PPrreevviioouuss FFiillee
       _S_y_n_o_p_s_i_s:
                     [[_c_o_u_n_t]]:p

       Examine the previous file. If a number _c_o_u_n_t is specified, the _c_o_u_n_tth
       previous file shall be examined. If _f_i_l_e_n_a_m_e refers to a non-seekable
       file, the results are unspecified.

   GGoo ttoo TTaagg
       _S_y_n_o_p_s_i_s:
                     ::tt _t_a_g_s_t_r_i_n_g<newline>

       If the file containing the tag named by the _t_a_g_s_t_r_i_n_g argument is not
       the current file, examine the file, as if the ::ee command was executed
       with that file as the argument. Otherwise, or in addition, display the
       screenful beginning with the tag, as described for the --tt option (see
       the OPTIONS section). If the _c_t_a_g_s utility is not supported by the
       system, the use of ::tt produces undefined results.

   IInnvvookkee EEddiittoorr
       _S_y_n_o_p_s_i_s:
                     vv

       Invoke an editor to edit the current file being examined. If standard
       input is being examined, the results are unspecified. The name of the
       editor shall be taken from the environment variable _E_D_I_T_O_R, or shall
       default to _v_i.  If the last pathname component in _E_D_I_T_O_R is either _v_i
       or _e_x, the editor shall be invoked with a --cc _l_i_n_e_n_u_m_b_e_r command line
       argument, where _l_i_n_e_n_u_m_b_e_r is the line number of the file line
       containing the display line currently displayed as the first line of
       the screen. It is implementation-defined whether line-setting options
       are passed to editors other than _v_i and _e_x.

       When the editor exits, _m_o_r_e shall resume with the same file and screen
       as when the editor was invoked.

   DDiissppllaayy PPoossiittiioonn
       _S_y_n_o_p_s_i_s:
                     ==
                     <<ccoonnttrrooll>>--GG

       Write a message for which the information references the first byte of
       the line after the last line of the file on the screen. This message
       shall include the name of the file currently being examined, its number
       relative to the total number of files there are to examine, the line
       number in the file, the byte number and the total bytes in the file,
       and what percentage of the file precedes the current position. If _m_o_r_e
       is reading from standard input, or the file is shorter than a single
       screen, the line number, the byte number, the total bytes, and the
       percentage need not be written.

   QQuuiitt
       _S_y_n_o_p_s_i_s:
                     qq
                     ::qq
                     ZZZZ

       Exit _m_o_r_e.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       If an error is encountered accessing a file when using the ::nn command,
       _m_o_r_e shall attempt to examine the next file in the argument list, but
       the final exit status shall be affected. If an error is encountered
       accessing a file via the ::pp command, _m_o_r_e shall attempt to examine the
       previous file in the argument list, but the final exit status shall be
       affected. If an error is encountered accessing a file via the ::ee
       command, _m_o_r_e shall remain in the current file and the final exit
       status shall not be affected.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       When the standard output is not a terminal, only the --ss filter-
       modification option is effective. This is based on historical practice.
       For example, a typical implementation of _m_a_n pipes its output through
       _m_o_r_e --ss to squeeze excess white space for terminal users. When _m_a_n is
       piped to _l_p, however, it is undesirable for this squeezing to happen.

EEXXAAMMPPLLEESS
       The --pp allows arbitrary commands to be executed at the start of each
       file.  Examples are:

       _m_o_r_e --pp GG _f_i_l_e_1 _f_i_l_e_2
             Examine each file starting with its last screenful.

       _m_o_r_e --pp 100 _f_i_l_e_1 _f_i_l_e_2
             Examine each file starting with line 100 in the current position
             (usually the third line, so line 98 would be the first line
             written).

       _m_o_r_e --pp /100 _f_i_l_e_1 _f_i_l_e_2
             Examine each file starting with the first line containing the
             string ""110000"" in the current position

RRAATTIIOONNAALLEE
       The _m_o_r_e utility, available in BSD and BSD-derived systems, was chosen
       as the prototype for the POSIX file display program since it is more
       widely available than either the public-domain program _l_e_s_s or than _p_g,
       a pager provided in System V. The 4.4 BSD _m_o_r_e is the model for the
       features selected; it is almost fully upwards-compatible from the 4.3
       BSD version in wide use and has become more amenable for _v_i users.
       Several features originally derived from various file editors, found in
       both _l_e_s_s and _p_g, have been added to this volume of POSIX.1-2008 as
       they have proved extremely popular with users.

       There are inconsistencies between _m_o_r_e and _v_i that result from
       historical practice. For example, the single-character commands hh, ff,
       bb, and <space> are screen movers in _m_o_r_e, but cursor movers in _v_i.
       These inconsistencies were maintained because the cursor movements are
       not applicable to _m_o_r_e and the powerful functionality achieved without
       the use of the control key justifies the differences.

       The tags interface has been included in a program that is not a text
       editor because it promotes another degree of consistent operation with
       _v_i.  It is conceivable that the paging environment of _m_o_r_e would be
       superior for browsing source code files in some circumstances.

       The operating mode referred to for block-mode terminals effectively
       adds a <newline> to each Synopsis line that currently has none. So, for
       example, dd<newline> would page one screenful. The mode could be
       triggered by a command line option, environment variable, or some other
       method. The details are not imposed by this volume of POSIX.1-2008
       because there are so few systems known to support such terminals.
       Nevertheless, it was considered that all systems should be able to
       support _m_o_r_e given the exception cited for this small community of
       terminals because, in comparison to _v_i, the cursor movements are few
       and the command set relatively amenable to the optional <newline>
       characters.

       Some versions of _m_o_r_e provide a shell escaping mechanism similar to the
       _e_x !!  command. The standard developers did not consider that this was
       necessary in a paginator, particularly given the wide acceptance of
       multiple window terminals and job control features. (They chose to
       retain such features in the editors and _m_a_i_l_x because the shell
       interaction also gives an opportunity to modify the editing buffer,
       which is not applicable to _m_o_r_e.)

       The --pp (position) option replaces the ++ command because of the Utility
       Syntax Guidelines. The ++_c_o_m_m_a_n_d option is no longer specified by
       POSIX.1-2008 but may be present in some implementations. In early
       proposals, it took a _p_a_t_t_e_r_n argument, but historical _l_e_s_s provided the
       _m_o_r_e general facility of a command. It would have been desirable to use
       the same --cc as _e_x and _v_i, but the letter was already in use.

       The text stating ``from a non-rewindable stream ... implementations may
       limit the amount of backwards motion supported'' would allow an
       implementation that permitted no backwards motion beyond text already
       on the screen. It was not possible to require a minimum amount of
       backwards motion that would be effective for all conceivable device
       types. The implementation should allow the user to back up as far as
       possible, within device and reasonable memory allocation constraints.

       Historically, non-printable characters were displayed using the ARPA
       standard mappings, which are as follows:

        1. Printable characters are left alone.

        2. Control characters less than \177 are represented as followed by
           the character offset from the ''@@'' character in the ASCII map; for
           example, \007 is represented as ''GG''.

        3. \177 is represented as followed by ''??''.

       The display of characters having their eighth bit set was less
       standard. Existing implementations use hex (0x00), octal (\000), and a
       meta-bit display. (The latter displayed characters with their eighth
       bit set as the two characters ""MM--"", followed by the seven-bit display
       as described previously.) The latter probably has the best claim to
       historical practice because it was used with the --vv option of 4 BSD and
       4 BSD-derived versions of the _c_a_t utility since 1980.

       No specific display format is required by POSIX.1-2008. Implementations
       are encouraged to conform to historic practice in the absence of any
       strong reason to diverge.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _C_h_a_p_t_e_r _2, _S_h_e_l_l _C_o_m_m_a_n_d _L_a_n_g_u_a_g_e, _c_t_a_g_s, _e_d, _e_x, _v_i

       The Base Definitions volume of POSIX.1-2008, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _S_e_c_t_i_o_n _9_._2, _R_e_g_u_l_a_r _E_x_p_r_e_s_s_i_o_n _G_e_n_e_r_a_l _R_e_q_u_i_r_e_m_e_n_t_s,
       _S_e_c_t_i_o_n _9_._3, _B_a_s_i_c _R_e_g_u_l_a_r _E_x_p_r_e_s_s_i_o_n_s, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x
       _G_u_i_d_e_l_i_n_e_s

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
       event of any discrepancy between this version and the original IEEE and
       The Open Group Standard, the original IEEE and The Open Group Standard
       is the referee document. The original Standard can be obtained online
       at http://www.unix.org/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2013                              MORE(1)
