📄 more.html
字号:
</pre><p>Return to the position thatwas previously marked with the letter named by<i>letter</i>,making that line the current position.<h5><a name = "tag_001_014_1472_015"> </a>Return to Previous Position</h5><pre><code><i>Synopsis</i>: "</code></pre><p>Return to the position from which the last large movement command wasexecuted (where a "large movement"is defined as any movement of more thana screenful of lines).If no such movements have been made, return tothe beginning of the file.<h5><a name = "tag_001_014_1472_016"> </a>Search Forward for Pattern</h5><p><code><i>Synopsis</i>: <b>[</b><i>count</i><b>]</b>/<b>[</b>!<b>]</b><i>pattern</i><newline></code><p>Search forward in the file for the<i>count</i>thline containing the<i>pattern</i>.The<i>count</i>defaults to 1.The search will start atthe line following the current position.If the search is successful, the screen will be modified so that thesearched-for line isin the current position.The null regular expression(/followed by anewline character)will repeat the search using the previous regular expression.If the character"!"is included, the lines for searching will be thosethat do not contain the<i>pattern</i>.<p>If a match is found for the<i>pattern</i>,the logical line containing the pattern will be written in thecurrent position.If the matching line isalready on the screen, the screen will be scrolled tomake that line the current position;otherwise, a full screen will be written.If no match is found for thepattern, a message to that effect will be written as apart of the prompt, and the screen and the current positionwill remain unchanged.However, if no match is found andthe input is the standard input, the screen may be scrolledto the last screenful of the input.<h5><a name = "tag_001_014_1472_017"> </a>Search Backward for Pattern</h5><p><code><i>Synopsis</i>: <b>[</b><i>count</i><b>]</b>?<b>[</b>!<b>]</b><i>pattern</i><newline></code><p>Search backward in the file for the<i>count</i>thline containing the<i>pattern</i>.The search will start at the line immediately before thecurrent position.If the search is successful, the screen will be modified so that thesearched-for line is in the current position.The null regular expression(?followed by anewline character)will repeat the search using the previous regular expression.If the character"!"is included, the lines for searching will be thosethat do not contain the<i>pattern</i>.<p>If a match is found for the<i>pattern</i>,the logical line containingthe pattern will be written inthe current position.If the matching line isalready on the screen, the screen will be scrolled tomake that line the current position;otherwise, a full screen will be written.If no match is found for thepattern, a message to that effect will be written as apart of the prompt, and the screen and the current positionwill remain unchanged.However, if no match is found andthe input is the standard input, the screen may be scrolledto the last screenful of the input.<h5><a name = "tag_001_014_1472_018"> </a>Repeat Search</h5><p><code><i>Synopsis</i>: <b>[</b><i>count</i><b>]</b>n</code><p>Repeat the previous search for<i>count</i>thline (default 1) containing the last<i>pattern</i>(or not containing the last<i>pattern</i>,if the previous searchwas/!or?!).<h5><a name = "tag_001_014_1472_019"> </a>Repeat Search in Reverse</h5><p><code><i>Synopsis</i>: <b>[</b><i>count</i><b>]</b>N</code><p>Repeat the search in the opposite direction of the previous search for the<i>count</i>thline (default 1) containing the last<i>pattern</i>(or not containing the last<i>pattern</i>,if the previous searchwas/!or?!).<h5><a name = "tag_001_014_1472_020"> </a>Examine New File</h5><p><code><i>Synopsis</i>: :e <b>[</b><i>filename</i><b>]</b><newline></code><p>Examine a new file.If the<i>filename</i>argument is not specified, the current file (see the<b>:n</b>and<b>:p</b>commandsbelow) from the list of files in the command line will be reexamined.The<i>filename</i>will be subjected to the process of shellword expansions (see<xref href=wordexp><a href="chap2.html#tag_001_006">Word Expansions</a></xref>);if more than a single pathname results, theeffects are unspecified.If<i>filename</i>is a number sign(#),the previously examined filewill be reexamined.If<i>filename</i>refers to a non-seekable file,the results are unspecified.<h5><a name = "tag_001_014_1472_021"> </a>Examine Next File</h5><p><code><i>Synopsis</i>: <b>[</b><i>count</i><b>]</b>:n</code><p>Examine the next file.If a number<i>count</i>is specified,the<i>count</i>thnext file will be examined.If<i>filename</i>refers to a non-seekable file,the results are unspecified.<h5><a name = "tag_001_014_1472_022"> </a>Examine Previous File</h5><p><code><i>Synopsis</i>: <b>[</b><i>count</i><b>]</b>:p</code><p>Examine the previous file.If a number<i>count</i>is specified, the<i>count</i>thprevious file will be examined.If<i>filename</i>refers toa non-seekable file,the results are unspecified.<h5><a name = "tag_001_014_1472_023"> </a>Go to Tag</h5><p><code><i>Synopsis</i>: :t <i>tagstring</i><newline></code><p>Go to the supplied<i>tagstring</i>and scroll/rewrite the screenwith that line in the current position;see the<b>-t</b>option.If the<i><a href="ctags.html">ctags</a></i>utility is not supported by the system, the use of:tproduces undefined results.<h5><a name = "tag_001_014_1472_024"> </a>Invoke Editor</h5><pre><code><i>Synopsis</i>: v</code></pre><p>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 will be taken from the environment variable<i>EDITOR ,</i>or defaults to<i><a href="vi.html">vi</a></i>.If<i>EDITOR</i>represents either<i><a href="vi.html">vi</a></i>or<i><a href="ex.html">ex</a></i>,the editor will be invokedwith options such that the current editor line is the physical linecorresponding to the current position in<i>more</i>at the time of invocation.For example, either<i><a href="ex.html">ex</a></i>or<i><a href="vi.html">vi</a></i>is invoked by specifyingthe editor name and following that with<b>-c</b> <i>linenumber</i>.It is implementation-dependent whether line-settingoptions are passed to editors other than<i><a href="vi.html">vi</a></i>and<i><a href="ex.html">ex</a></i>.<p>The file types that can be edited are implementation-dependent.<p>When the editor exits,<i>more</i>will resume on the current fileby rewriting the screen with the current lineas the current position.<h5><a name = "tag_001_014_1472_025"> </a>Display Position</h5><pre><code><i>Synopsis</i>: =<i>Synopsis</i>: <control>-G</code></pre><p>Write the name of the file currently being examined,the numberrelative to the total number of files there are to examine, the currentline number, the current byte number and the total bytes to write andwhat percentage of the fileprecedes the current position.If<i>more</i>is reading from standard input,or the file is shorter than a single screen, someof these items need not be written.All of these items will referencethe first byte of the line after the last line written.<h5><a name = "tag_001_014_1472_026"> </a>Quit</h5><pre><code><i>Synopsis</i>: q<i>Synopsis</i>: :q<i>Synopsis</i>: ZZ</code></pre><p>Exit<i>more</i>.</blockquote><h4><a name = "tag_001_014_1473"> </a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>Successful completion.<dt>>0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_1474"> </a>CONSEQUENCES OF ERRORS</h4><blockquote>If an error is encountered accessing a file when using the<b>:n</b>command,<i>more</i>will attempt to examine the next file in the argument list,but the final exit status will be affected.If an error is encountered accessing a file via the<b>:p</b>command,<i>more</i>will attempt to examine the previousfile in the argument list, but the final exit status will be affected.If an error is encountered accessing a file via the<b>:e</b>command,<i>more</i>will remain in the current file and the final exit status will notbe affected.</blockquote><h4><a name = "tag_001_014_1475"> </a>APPLICATION USAGE</h4><blockquote>The operating mode referred to for block-mode terminalseffectively adds a newline characterto each synopsis line that currently has none.So, for example,<b>d</b><newline>would page one screenful.The mode could be triggered by a command-line option,environment variable or some other method.<p>When the standard output is not a terminal, none ofthe filter-modification options are effective.This is based on historical practice.For example, a typical implementation of<i><a href="man.html">man</a></i>pipes its output through<i>more</i><b>-s</b>to squeeze excess white space for terminal users.When<i><a href="man.html">man</a></i>is piped to<i><a href="lp.html">lp</a></i>,however, it is undesirable for this squeezing to happen.</blockquote><h4><a name = "tag_001_014_1476"> </a>EXAMPLES</h4><blockquote>The<b>-p</b>allows arbitrary commands to be executed at thestart of each file.Examples are:<dl compact><dt><i>more </i>-p G <i>file1 file2</i><dd>Examine each file starting with its last screenful.<dt><i>more </i>-p 100 <i>file1 file2</i><dd>Examine each file starting with line 100 in the current position(usually the third line, so line 98 would be the firstline written).<dt><i>more </i>-p /100 <i>file1 file2</i><dd>Examine each file starting with the first linecontaining the string100in the current position</dl></blockquote><h4><a name = "tag_001_014_1477"> </a>FUTURE DIRECTIONS</h4><blockquote>The IEEE PASC 1003.2 Interpretations Committee has forwarded concerns aboutparts of this interface definition to the IEEE PASC 1003.2 Interpretations Committeewhich is identifying the corrections.A future revision of this specification will align withIEEE Std. 1003.2b when finalised.</blockquote><h4><a name = "tag_001_014_1478"> </a>SEE ALSO</h4><blockquote>None.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -