📄 more.html
字号:
<p>It is implementation-defined how other non-printable characters are written. Implementations should use the same format thatthey use for the <a href="../utilities/ex.html"><i>ex</i></a> <b>print</b> command; see the OPTIONS section within the <a href="../utilities/ed.html"><i>ed</i></a> utility. It is unspecified whether a multi-column character shall be separated if it crosses adisplay line boundary; it shall not be discarded. The behavior is unspecified if the number of columns on the display is less thanthe number of columns any single character in the line being displayed would occupy.</p><p>When each new file is displayed (or redisplayed), <i>more</i> shall write the first screen of the file. Once the initial screenhas been written, <i>more</i> shall prompt for a user command. If the execution of the user command results in a screen that haslines in common with the current screen, and the device has sufficient terminal capabilities, <i>more</i> shall scroll the screen;otherwise, it is unspecified whether the screen is scrolled or redrawn.</p><p>For all files but the last (including standard input if no file was specified, and for the last file as well, if the <b>-e</b>option was not specified), when <i>more</i> has written the last line in the file, <i>more</i> shall prompt for a user command.This prompt shall contain the name of the next file as well as an indication that <i>more</i> has reached end-of-file. If the usercommand is <b>f</b>, <control>-F, <space>, <b>j</b>, <newline>, <b>d</b>, <control>-D, or <b>s</b>,<i>more</i> shall display the next file. Otherwise, if displaying the last file, <i>more</i> shall exit. Otherwise, <i>more</i>shall execute the user command specified.</p><p>Several of the commands described in this section display a previous screen from the input stream. In the case that text isbeing taken from a non-rewindable stream, such as a pipe, it is implementation-defined how much backwards motion is supported. If acommand cannot be executed because of a limitation on backwards motion, an error message to this effect shall be displayed, thecurrent screen shall not change, and the user shall be prompted for another command.</p><p>If a command cannot be performed because there are insufficient lines to display, <i>more</i> shall alert the terminal. If acommand cannot be performed because there are insufficient lines to display or a <b>/</b> command fails: if the input is thestandard input, the last screen in the file may be displayed; otherwise, the current file and screen shall not change, and the usershall be prompted for another command.</p><p>The interactive commands in the following sections shall be supported. Some commands can be preceded by a decimal integer,called <i>count</i> in the following descriptions. If not specified with the command, <i>count</i> shall default to 1. In thefollowing descriptions, <i>pattern</i> is a basic regular expression, as described in the Base Definitions volume ofIEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap09.html#tag_09_03">Section 9.3, Basic Regular Expressions</a>. Theterm "examine" is historical usage meaning "open the file for viewing''; for example, <i>more</i> <b>foo</b> would be expressedas examining file <b>foo</b>.</p><p>In the following descriptions, unless otherwise specified, <i>line</i> is a line in the <i>more</i> display, not a line from thefile being examined.</p><p>In the following descriptions, the <i>current position</i> refers to two things:</p><ol><li><p>The position of the current line on the screen</p></li><li><p>The line number (in the file) of the current line on the screen</p></li></ol><p>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 thecurrent position is either the first or last line on the screen as described later.</p><h5><a name="tag_04_89_13_01"></a>Help</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>h</tt></pre></dd></dl><p>Write a summary of these commands and other implementation-defined commands. The behavior shall be as if the <i>more</i> utilitywere executed with the <b>-e</b> option on a file that contained the summary information. The user shall be prompted as describedearlier in this section when end-of-file is reached. If the user command is one of those specified to continue to the next file,<i>more</i> shall return to the file and screen state from which the <b>h</b> command was executed.</p><h5><a name="tag_04_89_13_02"></a>Scroll Forward One Screenful</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>f</tt><b>[</b><i>count</i><b>]</b><tt><control>-F</tt></pre></dd></dl><p>Scroll forward <i>count</i> lines, with a default of one screenful. If <i>count</i> is more than the screen size, only the finalscreenful shall be written.</p><h5><a name="tag_04_89_13_03"></a>Scroll Backward One Screenful</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>b</tt><b>[</b><i>count</i><b>]</b><tt><control>-B</tt></pre></dd></dl><p>Scroll backward <i>count</i> lines, with a default of one screenful (see the <b>-n</b> option). If <i>count</i> is more than thescreen size, only the final screenful shall be written.</p><h5><a name="tag_04_89_13_04"></a>Scroll Forward One Line</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt><space></tt><b>[</b><i>count</i><b>]</b><tt>j</tt><b>[</b><i>count</i><b>]</b><tt><newline></tt></pre></dd></dl><p>Scroll forward <i>count</i> lines. The default <i>count</i> for the <space> shall be one screenful; for <b>j</b> and<newline>, one line. The entire <i>count</i> lines shall be written, even if <i>count</i> is more than the screen size.</p><h5><a name="tag_04_89_13_05"></a>Scroll Backward One Line</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>k</tt></pre></dd></dl><p>Scroll backward <i>count</i> lines. The entire <i>count</i> lines shall be written, even if <i>count</i> is more than the screensize.</p><h5><a name="tag_04_89_13_06"></a>Scroll Forward One Half Screenful</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>d</tt><b>[</b><i>count</i><b>]</b><tt><control>-D</tt></pre></dd></dl><p>Scroll forward <i>count</i> lines, with a default of one half of the screen size. If <i>count</i> is specified, it shall becomethe new default for subsequent <b>d</b>, <control>-D, and <b>u</b> commands.</p><h5><a name="tag_04_89_13_07"></a>Skip Forward One Line</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>s</tt></pre></dd></dl><p>Display the screenful beginning with the line <i>count</i> lines after the last line on the current screen. If <i>count</i>would cause the current position to be such that less than one screenful would be written, the last screenful in the file shall bewritten.</p><h5><a name="tag_04_89_13_08"></a>Scroll Backward One Half Screenful</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>u</tt><b>[</b><i>count</i><b>]</b><tt><control>-U</tt></pre></dd></dl><p>Scroll backward <i>count</i> lines, with a default of one half of the screen size. If <i>count</i> is specified, it shall becomethe new default for subsequent <b>d</b>, <control>-D, <b>u</b>, and <control>-U commands. The entire <i>count</i> linesshall be written, even if <i>count</i> is more than the screen size.</p><h5><a name="tag_04_89_13_09"></a>Go to Beginning of File</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>g</tt></pre></dd></dl><p>Display the screenful beginning with line <i>count</i>.</p><h5><a name="tag_04_89_13_10"></a>Go to End-of-File</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>G</tt></pre></dd></dl><p>If <i>count</i> is specified, display the screenful beginning with the line <i>count</i>. Otherwise, display the last screenfulof the file.</p><h5><a name="tag_04_89_13_11"></a>Refresh the Screen</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>r<control>-L</tt></pre></dd></dl><p>Refresh the screen.</p><h5><a name="tag_04_89_13_12"></a>Discard and Refresh</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>R</tt></pre></dd></dl><p>Refresh the screen, discarding any buffered input. If the current file is non-seekable, buffered input shall not be discardedand the <b>R</b> command shall be equivalent to the <b>r</b> command.</p><h5><a name="tag_04_89_13_13"></a>Mark Position</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>m</tt><i>letter</i></pre></dd></dl><p>Mark the current position with the letter named by <i>letter</i>, where <i>letter</i> represents the name of one of thelowercase letters of the portable character set. When a new file is examined, all marks may be lost.</p><h5><a name="tag_04_89_13_14"></a>Return to Mark</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>'</tt><i>letter</i></pre></dd></dl><p>Return to the position that was previously marked with the letter named by <i>letter</i>, making that line the currentposition.</p><h5><a name="tag_04_89_13_15"></a>Return to Previous Position</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>''</tt></pre></dd></dl><p>Return to the position from which the last large movement command was executed (where a "large movement" is defined as anymovement of more than a screenful of lines). If no such movements have been made, return to the beginning of the file.</p><h5><a name="tag_04_89_13_16"></a>Search Forward for Pattern</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>/</tt><b>[</b><tt>!</tt><b>]</b><i>pattern</i><tt><newline></tt></pre></dd></dl><p>Display the screenful beginning with the <i>count</i>th line containing the pattern. The search shall start after the first linecurrently displayed. The null regular expression ( <tt>'/'</tt> followed by a <newline>) shall repeat the search using theprevious regular expression, with a default <i>count</i>. If the character <tt>'!'</tt> is included, the matching lines shall bethose that do not contain the <i>pattern</i>. If no match is found for the <i>pattern</i>, a message to that effect shall bedisplayed.</p><h5><a name="tag_04_89_13_17"></a>Search Backward for Pattern</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>?</tt><b>[</b><tt>!</tt><b>]</b><i>pattern</i><tt><newline></tt></pre></dd></dl><p>Display the screenful beginning with the <i>count</i>th previous line containing the pattern. The search shall start on the lastline before the first line currently displayed. The null regular expression ( <tt>'?'</tt> followed by a <newline>) shallrepeat the search using the previous regular expression, with a default <i>count</i>. If the character <tt>'!'</tt> is included,matching lines shall be those that do not contain the <i>pattern</i>. If no match is found for the <i>pattern</i>, a message tothat effect shall be displayed.</p><h5><a name="tag_04_89_13_18"></a>Repeat Search</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>n</tt></pre>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -