⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 more.html

📁 posix标准英文,html格式
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</dd></dl><p>Repeat the previous search for <i>count</i>th line containing the last <i>pattern</i> (or not containing the last<i>pattern</i>, if the previous search was <tt>"/!"</tt> or <tt>"?!"</tt> ).</p><h5><a name="tag_04_89_13_19"></a>Repeat Search in Reverse</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>N</tt></pre></dd></dl><p>Repeat the search in the opposite direction of the previous search for the <i>count</i>th line containing the last<i>pattern</i> (or not containing the last <i>pattern</i>, if the previous search was <tt>"/!"</tt> or <tt>"?!"</tt> ).</p><h5><a name="tag_04_89_13_20"></a>Examine New File</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>:e</tt> <b>[</b><i>filename</i><b>]</b><tt>&lt;newline&gt;</tt></pre></dd></dl><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) shall be re-examined. The <i>filename</i> shall be subjected to the process of shell word expansions (see <a href="xcu_chap02.html#tag_02_06"><i>Word Expansions</i></a>); if more than a single pathname results, the effects are unspecified. If<i>filename</i> is a number sign ( <tt>'#'</tt> ), the previously examined file shall be re-examined. If <i>filename</i> is notaccessible for any reason (including that it is a non-seekable file), an error message to this effect shall be displayed and thecurrent file and screen shall not change.</p><h5><a name="tag_04_89_13_21"></a>Examine Next File</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>:n</tt></pre></dd></dl><p>Examine the next file. If a number <i>count</i> is specified, the <i>count</i>th next file shall be examined. If <i>filename</i>refers to a non-seekable file, the results are unspecified.</p><h5><a name="tag_04_89_13_22"></a>Examine Previous File</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b><tt>:p</tt></pre></dd></dl><p>Examine the previous file. If a number <i>count</i> is specified, the <i>count</i>th previous file shall be examined. If<i>filename</i> refers to a non-seekable file, the results are unspecified.</p><h5><a name="tag_04_89_13_23"></a>Go to Tag</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>:t</tt> <i>tagstring</i><tt>&lt;newline&gt;</tt></pre></dd></dl><p>If the file containing the tag named by the <i>tagstring</i> argument is not the current file, examine the file, as if the<b>:e</b> command was executed with that file as the argument. Otherwise, or in addition, display the screenful beginning with thetag, as described for the <b>-t</b> option (see the OPTIONS section). If the <a href="../utilities/ctags.html"><i>ctags</i></a>utility is not supported by the system, the use of <b>:t</b> produces undefined results.</p><h5><a name="tag_04_89_13_24"></a>Invoke Editor</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>v</tt></pre></dd></dl><p>Invoke an editor to edit the current file being examined. If standard input is being examined, the results are unspecified. Thename of the editor shall be taken from the environment variable <i>EDITOR ,</i> or shall default to <a href="../utilities/vi.html"><i>vi</i></a>. If the last pathname component in <i>EDITOR</i> is either <a href="../utilities/vi.html"><i>vi</i></a> or <a href="../utilities/ex.html"><i>ex</i></a>, the editor shall be invoked with a <b>-c</b><i>linenumber</i> command line argument, where <i>linenumber</i> is the line number of the file line containing the display linecurrently displayed as the first line of the screen. It is implementation-defined whether line-setting options are passed toeditors other than <a href="../utilities/vi.html"><i>vi</i></a> and <a href="../utilities/ex.html"><i>ex</i></a>.</p><p>When the editor exits, <i>more</i> shall resume with the same file and screen as when the editor was invoked.</p><h5><a name="tag_04_89_13_25"></a>Display Position</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>=&lt;control&gt;-G</tt></pre></dd></dl><p>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 thereare to examine, the line number in the file, the byte number and the total bytes in the file, and what 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, the linenumber, the byte number, the total bytes, and the percentage need not be written.</p><h5><a name="tag_04_89_13_26"></a>Quit</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>q:qZZ</tt></pre></dd></dl><p>Exit <i>more</i>.</p></blockquote><h4><a name="tag_04_89_14"></a>EXIT STATUS</h4><blockquote><p>The following exit values shall be returned:</p><dl compact><dt>&nbsp;0</dt><dd>Successful completion.</dd><dt>&gt;0</dt><dd>An error occurred.</dd></dl></blockquote><h4><a name="tag_04_89_15"></a>CONSEQUENCES OF ERRORS</h4><blockquote><p>If an error is encountered accessing a file when using the <b>:n</b> command, <i>more</i> shall attempt to examine the next filein the argument list, but the final exit status shall be affected. If an error is encountered accessing a file via the <b>:p</b>command, <i>more</i> 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 <b>:e</b> command, <i>more</i> shall remain in the current file and the finalexit status shall not be affected.</p></blockquote><hr><div class="box"><em>The following sections are informative.</em></div><h4><a name="tag_04_89_16"></a>APPLICATION USAGE</h4><blockquote><p>When the standard output is not a terminal, only the <b>-s</b> filter-modification option is effective. This is based onhistorical practice. For example, a typical implementation of <a href="../utilities/man.html"><i>man</i></a> pipes its outputthrough <i>more</i> <b>-s</b> to squeeze excess white space for terminal users. When <a href="../utilities/man.html"><i>man</i></a>is piped to <a href="../utilities/lp.html"><i>lp</i></a>, however, it is undesirable for this squeezing to happen.</p></blockquote><h4><a name="tag_04_89_17"></a>EXAMPLES</h4><blockquote><p>The <b>-p</b> allows arbitrary commands to be executed at the start of each file. Examples are:</p><dl compact><dt><i>more&nbsp;</i> <b>-p&nbsp;G&nbsp;</b> <i>file1&nbsp;file2</i></dt><dd>Examine each file starting with its last screenful.</dd><dt><i>more&nbsp;</i> <b>-p&nbsp;</b> 100&nbsp;<i>file1&nbsp;file2</i></dt><dd>Examine each file starting with line 100 in the current position (usually the third line, so line 98 would be the first linewritten).</dd><dt><i>more&nbsp;</i> <b>-p&nbsp;</b> /100&nbsp;<i>file1&nbsp;file2</i></dt><dd>Examine each file starting with the first line containing the string <tt>"100"</tt> in the current position</dd></dl></blockquote><h4><a name="tag_04_89_18"></a>RATIONALE</h4><blockquote><p>The <i>more</i> utility, available in BSD and BSD-derived systems, was chosen as the prototype for the POSIX file displayprogram since it is more widely available than either the public-domain program <i>less</i> or than <i>pg</i>, a pager provided inSystem V. The 4.4 BSD <i>more</i> is the model for the features selected; it is almost fully upwards-compatible from the 4.3 BSDversion in wide use and has become more amenable for <a href="../utilities/vi.html"><i>vi</i></a> users. Several featuresoriginally derived from various file editors, found in both <i>less</i> and <i>pg</i>, have been added to this volume ofIEEE&nbsp;Std&nbsp;1003.1-2001 as they have proved extremely popular with users.</p><p>There are inconsistencies between <i>more</i> and <a href="../utilities/vi.html"><i>vi</i></a> that result from historicalpractice. For example, the single-character commands <b>h</b>, <b>f</b>, <b>b</b>, and &lt;space&gt; are screen movers in<i>more</i>, but cursor movers in <a href="../utilities/vi.html"><i>vi</i></a>. These inconsistencies were maintained because thecursor movements are not applicable to <i>more</i> and the powerful functionality achieved without the use of the control keyjustifies the differences.</p><p>The tags interface has been included in a program that is not a text editor because it promotes another degree of consistentoperation with <a href="../utilities/vi.html"><i>vi</i></a>. It is conceivable that the paging environment of <i>more</i> would besuperior for browsing source code files in some circumstances.</p><p>The operating mode referred to for block-mode terminals effectively adds a &lt;newline&gt; to each Synopsis line that currentlyhas none. So, for example, <b>d</b> &lt;newline&gt; 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 IEEE&nbsp;Std&nbsp;1003.1-2001 becausethere are so few systems known to support such terminals. Nevertheless, it was considered that all systems should be able tosupport <i>more</i> given the exception cited for this small community of terminals because, in comparison to <a href="../utilities/vi.html"><i>vi</i></a>, the cursor movements are few and the command set relatively amenable to the optional&lt;newline&gt;s.</p><p>Some versions of <i>more</i> provide a shell escaping mechanism similar to the <a href="../utilities/ex.html"><i>ex</i></a><b>!</b> command. The standard developers did not consider that this was necessary in a paginator, particularly given the wideacceptance of multiple window terminals and job control features. (They chose to retain such features in the editors and <a href="../utilities/mailx.html"><i>mailx</i></a> because the shell interaction also gives an opportunity to modify the editing buffer,which is not applicable to <i>more</i>.)</p><p>The <b>-p</b> (position) option replaces the <b>+</b> command because of the Utility Syntax Guidelines. In early proposals, ittook a <i>pattern</i> argument, but historical <i>less</i> provided the <i>more</i> general facility of a command. It would havebeen desirable to use the same <b>-c</b> as <a href="../utilities/ex.html"><i>ex</i></a> and <a href="../utilities/vi.html"><i>vi</i></a>, but the letter was already in use.</p><p>The text stating &quot;from a non-rewindable stream ... implementations may limit the amount of backwards motion supported&quot; wouldallow an implementation that permitted no backwards motion beyond text already on the screen. It was not possible to require aminimum amount of backwards motion that would be effective for all conceivable device types. The implementation should allow theuser to back up as far as possible, within device and reasonable memory allocation constraints.</p><p>Historically, non-printable characters were displayed using the ARPA standard mappings, which are as follows:</p><ol><li><p>Printable characters are left alone.</p></li><li><p>Control characters less than \177 are represented as followed by the character offset from the <tt>'@'</tt> character in theASCII map; for example, \007 is represented as <tt>'G'</tt>.</p></li><li><p>\177 is represented as followed by <tt>'?'</tt>.</p></li></ol><p>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 <tt>"M-"</tt>, followedby the seven-bit display as described previously.) The latter probably has the best claim to historical practice because it wasused with the <b>-v</b> option of 4 BSD and 4 BSD-derived versions of the <a href="../utilities/cat.html"><i>cat</i></a> utilitysince 1980.</p><p>No specific display format is required by IEEE&nbsp;Std&nbsp;1003.1-2001. Implementations are encouraged to conform to historicpractice in the absence of any strong reason to diverge.</p></blockquote><h4><a name="tag_04_89_19"></a>FUTURE DIRECTIONS</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_04_89_20"></a>SEE ALSO</h4><blockquote><p><a href="xcu_chap02.html#tag_02"><i>Shell Command Language</i></a>, <a href="ctags.html"><i>ctags</i></a>, <a href="ed.html"><i>ed</i></a>, <a href="ex.html"><i>ex</i></a>, <a href="vi.html"><i>vi</i></a></p></blockquote><h4><a name="tag_04_89_21"></a>CHANGE HISTORY</h4><blockquote><p>First released in Issue 4.</p></blockquote><h4><a name="tag_04_89_22"></a>Issue 5</h4><blockquote><p>The FUTURE DIRECTIONS section is added.</p></blockquote><h4><a name="tag_04_89_23"></a>Issue 6</h4><blockquote><p>This utility is marked as part of the User Portability Utilities option.</p><p>The obsolescent SYNOPSIS is removed.</p><p>The utility has been extensively reworked for alignment with the IEEE&nbsp;P1003.2b draft standard:</p><ul><li><p>Changes have been made as a result of IEEE PASC Interpretations 1003.2 #37 and #109.</p></li><li><p>The <i>more</i> utility should be able to handle underlined and emboldened displays of characters that are wider than a singlecolumn position.</p></li></ul></blockquote><div class="box"><em>End of informative text.</em></div><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX &reg; is a registered Trademark of The Open Group.<br>POSIX &reg; is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -