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

📄 more.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>more</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_1460">&nbsp;</a>NAME</h4><blockquote>more - display files on a page-by-page basis</blockquote><h4><a name = "tag_001_014_1461">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>more <b>[</b>-ceisu<b>][</b>-n <i>number</i><b>][</b>-p <i>command</i><b>][</b>-t <i>tagstring</i><b>][</b><i>file</i>...<b>]</b>more <b>[</b>-ceisu<b>][</b>-n <i>number</i><b>][</b>+<i>command</i><b>][</b>-t <i>tagstring</i><b>][</b><i>file</i>...<b>]</b></code></pre></blockquote><h4><a name = "tag_001_014_1462">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>more</i>utility reads files and either writes themto the terminal on a page-by-page basisor filters them to standard output.If standard output is not a terminal device,all input files are copied to standard output in theirentirety,without modification.If standard output is a terminal device,the files will be written a number of lines(one screenful) at a time under the control ofuser commands; see the EXTENDED DESCRIPTION section.<p>Certain block-mode terminals do not have all the capabilitiesnecessary to support the complete<i>more</i>definition;they are incapable of accepting commands thatare not terminated with anewline character.Implementations that support such terminalsprovide an operating mode to<i>more</i>in which all commands can be terminated with anewline characteron those terminals.This mode will:<ul><p><li>be documented in the system documentation<p><li>at invocation,inform the user of the terminal deficiency that requires thenewline characterusage and provide instructions on how this warningcan be suppressed in future invocations<p><li>not be required for implementations supportingonly fully capable terminals<p><li>not affect commands already requiring newline characters<p><li>not affect users on the capable terminals from using<i>more</i>as described in this specification<p></ul></blockquote><h4><a name = "tag_001_014_1463">&nbsp;</a>OPTIONS</h4><blockquote>The<i>more</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> ,except that<i>+command</i>of the obsolescent version uses a non-standard syntax.<p>The following options are supported:<dl compact><dt><b>-c</b><dd>If a screen is to be written that has no lines in common withthe current screen, or<i>more</i>is writing its first screen,<i>more</i>will not scroll the screen, but instead will redraw each lineof the screen in turn, from the top of the screen to the bottom.In addition, if<i>more</i>is writing its first screen, the screen will be cleared.This option may be ignored on devices that donot have the ability to clear to the end of a line or the end of a screen.<dt><b>-e</b><dd>Exit immediately after writing the last line of the last filein the argument list; see the EXTENDED DESCRIPTION section.<dt><b>-i</b><dd>Perform pattern matching in searches without regard to case.Seethe <b>XBD</b> specification, <a href="../xbd/re.html#tag_007_002"><b>Regular Expression General Requirements</b>&nbsp;</a>  .<dt><b>-n&nbsp;</b><i>number</i><dd>Specify the number of lines per screenful.The<i>number</i>argument is a positive decimal integer.The<b>-n</b>option overrides any values obtained from the environment.<dt><b>-p&nbsp;</b><i>command</i><dd><dt>+<i>command</i><dd>For each file examined,initially execute the<i>more</i>command in the<i>command</i>argument.If the command is a positioning command,such as a line number or aregular expression search,set the current position (see the EXTENDED DESCRIPTION section)to represent the final results of the command,without writing any intermediate lines of the file.For example, the two commands:<pre><code>more -p 1000j filemore -p 1000G file</code></pre>would be equivalent and start the display with thecurrent position at line 1000,bypassing the lines that<b>j</b>would write and scroll off the screen if it had been issuedduring the file examination.If the positioning command is unsuccessful, the first line in the filewill be the current position.<dt><b>-s</b><dd>Replace consecutive empty lines with a single empty line.<dt><b>-t&nbsp;</b><i>tagstring</i><dd>Write the screenful of the file containing the tag named by the<i>tagstring</i>argument.See the<i><a href="ctags.html">ctags</a></i>utility.The tags feature represented by<b>-t</b>&nbsp;<i>tagstring</i>and the<b>:t</b>command is optional.It is provided on any system thatalso providesa conformingimplementation of<i><a href="ctags.html">ctags</a></i>;otherwise, the use of<b>-t</b>produces undefined results.<dt><b>-u</b><dd>Treat abackspace characteras a printable control character, displayed as an implementation-dependentcharacter sequence (see the EXTENDED DESCRIPTION section),suppressing backspacing and the special handling that produces underlinedor standout-mode text on some terminal types.Also, do not ignore acarriage-returncharacter at the end of a line.</dl><p>If both the<b>-t</b>&nbsp;<i>tagstring</i>and<b>-p</b>&nbsp;<i>command</i>(or the obsolescent<i>+command</i>)options are given, the<b>-t</b>&nbsp;<i>tagstring</i>will be processed first; that is,the file containing the tag is selected by<b>-t</b>and then the command is executed.</blockquote><h4><a name = "tag_001_014_1464">&nbsp;</a>OPERANDS</h4><blockquote>The following operand is supported:<dl compact><dt><i>file</i><dd>A pathname of an input file.If no<i>file</i>operands are specified, the standard input will be used.If a<i>file</i>is "-", the standard input will be read at that point in the sequence.</dl></blockquote><h4><a name = "tag_001_014_1465">&nbsp;</a>STDIN</h4><blockquote>The standard input will be used only if no<i>file</i>operands are specified, or if a<i>file</i>operand is "-".</blockquote><h4><a name = "tag_001_014_1466">&nbsp;</a>INPUT FILES</h4><blockquote>The input files being examined must be text files.If standard output is a terminal,standard error will be used to read commands from the user.If standard output is a terminal, standard error is not readable,and command input is needed,<i>more</i>will terminate with an errorindicating that it was unable to read user commands.If standard output is not a terminal,no error will result if standard error cannot beopened for reading.</blockquote><h4><a name = "tag_001_014_1467">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>more</i>:<dl compact><dt><i>COLUMNS</i><dd>Override the system-selected horizontal screen size.Seethe <b>XBD</b> specification, <a href="../xbd/envvar.html"><b>Environment Variables</b>&nbsp;</a> for valid values and results when it is unset or null.<dt><i>EDITOR</i><dd>Used by the<b>v</b>command to select an editor;see the EXTENDED DESCRIPTION section.<dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_COLLATE</i><dd>Determine the locale for thebehaviour of ranges, equivalence classesand multi-character collating elementswithin regular expressions.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments and input files) andthe behaviour of character classes within regular expressions.<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard errorand informative messages written to standard output.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i><dt><i>LINES</i><dd>Override the system-selected vertical screen size,used as the number of lines in a screenful.Seethe <b>XBD</b> specification, <a href="../xbd/envvar.html"><b>Environment Variables</b>&nbsp;</a> for valid values and results when it is unset or null.The<b>-n</b>option takes precedence over the<i>LINES</i>variable for determining the number of lines in a screenful.<dt><i>MORE</i><dd>Determine astring containing options described in the OPTIONS sectionpreceded with hyphens andblank-character-separatedas on the command line.Any command-line options are processed afterthose in the<i>MORE</i>variable, as if the command line were:<pre><code>more $MORE <i>options</i> <i>operands</i></code></pre>The<i>MORE</i>variable takes precedence over the<i>TERM</i>and<i>LINES</i>variables for determining the number of lines in a screenful.<dt><i>TERM</i><dd>Determine the name of the terminal type.If this variable isunset or null, an unspecifieddefault terminal type will be used.</dl></blockquote><h4><a name = "tag_001_014_1468">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_1469">&nbsp;</a>STDOUT</h4><blockquote>The standard output will be used to write the contents of the input files.</blockquote><h4><a name = "tag_001_014_1470">&nbsp;</a>STDERR</h4><blockquote>Used for diagnostic messages and user commands (see theINPUT FILES section),and, if standard output is a terminal device, to write a prompting string.The prompting string will only appear as the last line of the screen andwill contain the name of the file currently being examined, but it isotherwise unspecified.User input for the<b>/</b>,<b>?</b>,<b>:e</b>and<b>:t</b>commands will be written on the same line of the screen as the prompt.It is unspecified if informational messages are written for other usercommands.</blockquote><h4><a name = "tag_001_014_1471">&nbsp;</a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1472">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>The number of lines available per screen is determined by the<b>-n</b>option, if present or by examining values in the environment (seethe ENVIRONMENT VARIABLES section).If neither method yields a number, an unspecified number oflines will be used.The actual number of lines written will be oneless than this number, as the last line of the screen will be usedto write a user prompt and user input.If the number of lines availableper screen is less than four, the results are undefined.<p>In the following descriptions, the<i>current position</i>refers to two things:<ul><p><li>the position of the current line on the screen<p><li>the line number (in the file) of the current line on the screen.<p></ul><p>Usually, the line on the screen corresponding to the current position isthe third line on the screen.If this is not possible (there are fewerthan 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 iseither the first or last line on the screen as described later.<p>The number of columns available per line is determined by examiningvalues in the environment (see the ENVIRONMENT VARIABLES section),with a default value as described inthe <b>XBD</b> specification, <a href="../xbd/envvar.html"><b>Environment Variables</b>&nbsp;</a> .The<i>more</i>utility writes lines containing more charactersthan would fit into this number of columnsby breaking the line into one or more logical lineswhere each of these lines but the last contains the number of

⌨️ 快捷键说明

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