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

📄 more.html

📁 posix标准英文,html格式
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2004 IEEE and The Open Group, All Rights Reserved --><title>more</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="more"></a> <a name="tag_04_89"></a><!-- more --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2004 Edition<br>Copyright &copy; 2001-2004 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_04_89_01"></a>NAME</h4><blockquote>more - display files on a page-by-page basis</blockquote><h4><a name="tag_04_89_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><div class="box"><code><tt><sup>[<a href="javascript:open_code('UP')">UP</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> more</tt> <b>[</b><tt>-ceisu</tt><b>][</b><tt>-n</tt> <i>number</i><b>][</b><tt>-p</tt><i>command</i><b>][</b><tt>-t</tt> <i>tagstring</i><b>][</b><i>file</i> <tt>...</tt><b>]</b><tt><img src="../images/opt-end.gif"alt="[Option End]" border="0"></tt></code></div></blockquote><h4><a name="tag_04_89_03"></a>DESCRIPTION</h4><blockquote><p>The <i>more</i> utility shall read files and either write them to the terminal on a page-by-page basis or filter them tostandard 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 <b>-s</b> option. If standard output is a terminal device, the files shall bewritten a number of lines (one screenful) at a time under the control of user commands. See the EXTENDED DESCRIPTION section.</p><p>Certain block-mode terminals do not have all the capabilities necessary to support the complete <i>more</i> definition; they areincapable of accepting commands that are not terminated with a &lt;newline&gt;. Implementations that support such terminals shallprovide an operating mode to <i>more</i> in which all commands can be terminated with a &lt;newline&gt; on those terminals. Thismode:</p><ul><li><p>Shall be documented in the system documentation</p></li><li><p>Shall, at invocation, inform the user of the terminal deficiency that requires the &lt;newline&gt; usage and provideinstructions on how this warning can be suppressed in future invocations</p></li><li><p>Shall not be required for implementations supporting only fully capable terminals</p></li><li><p>Shall not affect commands already requiring &lt;newline&gt;s</p></li><li><p>Shall not affect users on the capable terminals from using <i>more</i> as described in this volume ofIEEE&nbsp;Std&nbsp;1003.1-2001</p></li></ul></blockquote><h4><a name="tag_04_89_04"></a>OPTIONS</h4><blockquote><p>The <i>more</i> utility shall conform to the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p><p>The following options shall be supported:</p><dl compact><dt><b>-c</b></dt><dd>If a screen is to be written that has no lines in common with the current screen, or <i>more</i> is writing its first screen,<i>more</i> shall not scroll the screen, but instead shall redraw each line of the screen in turn, from the top of the screen tothe bottom. In addition, if <i>more</i> is writing its first screen, the screen shall be cleared. This option may be silentlyignored on devices with insufficient terminal capabilities.</dd><dt><b>-e</b></dt><dd>By default, <i>more</i> shall exit immediately after writing the last line of the last file in the argument list. If the<b>-e</b> option is specified: <ol><li><p>If there is only a single file in the argument list and that file was completely displayed on a single screen, <i>more</i> shallexit immediately after writing the last line of that file.</p></li><li><p>Otherwise, <i>more</i> shall exit only after reaching end-of-file on the last file in the argument list twice without anintervening operation. See the EXTENDED DESCRIPTION section.</p></li></ol></dd><dt><b>-i</b></dt><dd>Perform pattern matching in searches without regard to case; see the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,<a href="../basedefs/xbd_chap09.html#tag_09_02">Section 9.2, Regular Expression General Requirements</a>.</dd><dt><b>-n&nbsp;</b> <i>number</i></dt><dd>Specify the number of lines per screenful. The <i>number</i> argument is a positive decimal integer. The <b>-n</b> option shalloverride any values obtained from any other source.</dd><dt><b>-p&nbsp;</b> <i>command</i></dt><dd>Each time a screen from a new file is displayed or redisplayed (including as a result of <i>more</i> commands; for example,<b>:p</b>), execute the <i>more</i> command(s) in the command arguments in the order specified, as if entered by the user after thefirst screen has been displayed. No intermediate results shall be displayed (that is, if the command is a movement to a screendifferent from the normal first screen, only the screen resulting from the command shall be displayed.) If any of the commands failfor any reason, an informational message to this effect shall be written, and no further commands specified using the <b>-p</b>option shall be executed for this file.</dd><dt><b>-s</b></dt><dd>Behave as if consecutive empty lines were a single empty line.</dd><dt><b>-t&nbsp;</b> <i>tagstring</i></dt><dd>Write the screenful of the file containing the tag named by the <i>tagstring</i> argument. See the <a href="ctags.html"><i>ctags</i></a> utility. The tags feature represented by <b>-t</b> <i>tagstring</i> and the <b>:t</b> command isoptional. It shall be provided on any system that also provides a conforming implementation of <a href="../utilities/ctags.html"><i>ctags</i></a>; otherwise, the use of <b>-t</b> produces undefined results. <p>The filename resulting from the <b>-t</b> option shall be logically added as a prefix to the list of command line files, as ifspecified by the user. If the tag named by the <i>tagstring</i> argument is not found, it shall be an error, and <i>more</i> shalltake no further action.</p><p>If the tag specifies a line number, the first line of the display shall contain the beginning of that line. If the tag specifiesa pattern, the first line of the display shall contain the beginning of the matching text from the first line of the file thatcontains that pattern. If the line does not exist in the file or matching text is not found, an informational message to thiseffect shall be displayed, and <i>more</i> shall display the default screen as if <b>-t</b> had not been specified.</p><p>If both the <b>-t</b> <i>tagstring</i> and <b>-p</b> <i>command</i> options are given, the <b>-t</b> <i>tagstring</i> shall beprocessed first; that is, the file and starting line for the display shall be as specified by <b>-t</b>, and then the <b>-p</b><i>more</i> command shall be executed. If the line (matching text) specified by the <b>-t</b> command does not exist (is notfound), no <b>-p</b> <i>more</i> command shall be executed for this file at any time.</p></dd><dt><b>-u</b></dt><dd>Treat a &lt;backspace&gt; as a printable control character, displayed as an implementation-defined character sequence (see theEXTENDED DESCRIPTION section), suppressing backspacing and the special handling that produces underlined or standout mode text onsome terminal types. Also, do not ignore a &lt;carriage-return&gt; at the end of a line.</dd></dl></blockquote><h4><a name="tag_04_89_05"></a>OPERANDS</h4><blockquote><p>The following operand shall be supported:</p><dl compact><dt><i>file</i></dt><dd>A pathname of an input file. If no <i>file</i> operands are specified, the standard input shall be used. If a <i>file</i> is<tt>'-'</tt>, the standard input shall be read at that point in the sequence.</dd></dl></blockquote><h4><a name="tag_04_89_06"></a>STDIN</h4><blockquote><p>The standard input shall be used only if no <i>file</i> operands are specified, or if a <i>file</i> operand is <tt>'-'</tt>.</p></blockquote><h4><a name="tag_04_89_07"></a>INPUT FILES</h4><blockquote><p>The input files being examined shall be text files. If standard output is a terminal, standard error shall be used to readcommands from the user. If standard output is a terminal, standard error is not readable, and command input is needed, <i>more</i>may attempt to obtain user commands from the controlling terminal (for example, <b>/dev/tty</b>); otherwise, <i>more</i> shallterminate with an error indicating that it was unable to read user commands. If standard output is not a terminal, no error shallresult if standard error cannot be opened for reading.</p></blockquote><h4><a name="tag_04_89_08"></a>ENVIRONMENT VARIABLES</h4><blockquote><p>The following environment variables shall affect the execution of <i>more</i>:</p><dl compact><dt><i>COLUMNS</i></dt><dd>Override the system-selected horizontal display line size. See the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,<a href="../basedefs/xbd_chap08.html">Chapter 8, Environment Variables</a> for valid values and results when it is unset ornull.</dd><dt><i>EDITOR</i></dt><dd>Used by the <b>v</b> command to select an editor. See the EXTENDED DESCRIPTION section.</dd><dt><i>LANG</i></dt><dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume ofIEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> forthe precedence of internationalization variables used to determine the values of locale categories.)</dd><dt><i>LC_ALL</i></dt><dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd><dt><i>LC_COLLATE</i></dt><dd>Determine the locale for the behavior of ranges, equivalence classes, and multi-character collating elements within regularexpressions.</dd><dt><i>LC_CTYPE</i></dt><dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte asopposed to multi-byte characters in arguments and input files) and the behavior of character classes within regularexpressions.</dd><dt><i>LC_MESSAGES</i></dt><dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error andinformative messages written to standard output.</dd><dt><i>NLSPATH</i></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><i>LINES</i></dt><dd>Override the system-selected vertical screen size, used as the number of lines in a screenful. See the Base Definitions volumeof IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap08.html">Chapter 8, Environment Variables</a> for valid values andresults when it is unset or null. The <b>-n</b> option shall take precedence over the <i>LINES</i> variable for determining thenumber of lines in a screenful.</dd><dt><i>MORE</i></dt><dd>Determine a string containing options described in the OPTIONS section preceded with hyphens and &lt;blank&gt;-separated as onthe command line. Any command line options shall be processed after those in the <i>MORE</i> variable, as if the command line were:<pre><tt>more $MORE</tt> <i>options operands</i></pre><p>The <i>MORE</i> variable shall take precedence over the <i>TERM</i> and <i>LINES</i> variables for determining the number oflines in a screenful.</p></dd><dt><i>TERM</i></dt><dd>Determine the name of the terminal type. If this variable is unset or null, an unspecified default terminal type is used.</dd></dl></blockquote><h4><a name="tag_04_89_09"></a>ASYNCHRONOUS EVENTS</h4><blockquote><p>Default.</p></blockquote><h4><a name="tag_04_89_10"></a>STDOUT</h4><blockquote><p>The standard output shall be used to write the contents of the input files.</p></blockquote><h4><a name="tag_04_89_11"></a>STDERR</h4><blockquote><p>The standard error shall be used for diagnostic messages and user commands (see the INPUT FILES section), and, if standardoutput is a terminal device, to write a prompting string. The prompting string shall appear on the screen line below the last lineof the file displayed in the current screenful. The prompt shall contain the name of the file currently being examined and shallcontain an end-of-file indication and the name of the next file, if any, when prompting at the end-of-file. If an error orinformational 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 userprompt may be displayed. The prompt is otherwise unspecified. It is unspecified whether informational messages are written forother user commands.</p></blockquote><h4><a name="tag_04_89_12"></a>OUTPUT FILES</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_04_89_13"></a>EXTENDED DESCRIPTION</h4><blockquote><p>The following section describes the behavior of <i>more</i> when the standard output is a terminal device. If the standardoutput is not a terminal device, no options other than <b>-s</b> shall have any effect, and all input files shall be copied tostandard output otherwise unmodified, at which time <i>more</i> shall exit without further action.</p><p>The number of lines available per screen shall be determined by the <b>-n</b> option, if present, or by examining values in theenvironment (see the ENVIRONMENT VARIABLES section). If neither method yields a number, an unspecified number of lines shall beused.</p><p>The maximum number of lines written shall be one less than this number, because the screen line after the last line writtenshall be used to write a user prompt and user input. If the number of lines in the screen is less than two, the results areundefined. It is unspecified whether user input is permitted to be longer than the remainder of the single line where the prompthas been written.</p><p>The number of columns available per line shall be determined by examining values in the environment (see the ENVIRONMENTVARIABLES section), with a default value as described in the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap08.html">Chapter 8, Environment Variables</a>.</p><p>Lines that are longer than the display shall be folded; the length at which folding occurs is unspecified, but should beappropriate for the output device. Folding may occur between glyphs of single characters that take up multiple display columns.</p><p>When standard output is a terminal and <b>-u</b> is not specified, <i>more</i> shall treat &lt;backspace&gt;s and&lt;carriage-return&gt;s specially:</p><ul><li><p>A character, followed first by a sequence of <i>n</i> &lt;backspace&gt;s (where <i>n</i> is the same as the number of columnpositions that the character occupies), then by <i>n</i> underscore characters ( <tt>'_'</tt> ), shall cause that character to bewritten as underlined text, if the terminal type supports that. The <i>n</i> underscore characters, followed first by <i>n</i>&lt;backspace&gt;s, then any character with <i>n</i> column positions, shall also cause that character to be written as underlinedtext, if the terminal type supports that.</p></li><li><p>A sequence of <i>n</i> &lt;backspace&gt;s (where <i>n</i> is the same as the number of column positions that the previouscharacter occupies) that appears between two identical printable characters shall cause the first of those two characters to bewritten 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 &lt;backspace&gt;/ character pairs for that same charactershall also be discarded. (For example, the sequence <tt>"a\ba\ba\ba"</tt> is interpreted as a single emboldened <tt>'a'</tt>.)</p></li><li><p>The <i>more</i> utility shall logically discard all other &lt;backspace&gt;s from the line as well as the character whichprecedes them, if any.</p></li><li><p>A &lt;carriage-return&gt; at the end of a line shall be ignored, rather than being written as a non-printable character, asdescribed in the next paragraph.</p></li></ul>

⌨️ 快捷键说明

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