大网数据广告活动
Windows排障命令

more

· 52CE 我爱测

Reference article for the more command, which displays one screen of output at a time.

Displays one screen of output at a time.

Note: The more command, with different parameters, is also available from the Recovery Console.

Syntax

<command> | more [/c] [/p] [/s] [/t<n>] [+<n>]
more [[/c] [/p] [/s] [/t<n>] [+<n>]] < [<drive>:][<path>]<filename>
more [/c] [/p] [/s] [/t<n>] [+<n>] [<files>]

Parameters

Parameter Description
<command> Specifies a command for which you want to display the output.
/c Clears the screen before displaying a page.
/p Expands form-feed characters.
/s Displays multiple blank lines as a single blank line.
/t<n> Displays tabs as the number of spaces specified by n.
+<n> Displays the first file, beginning at the line specified by n.
[<drive>:][<path>]<filename> Specifies the location and name of a file to display.
<files> Specifies a list of files to display. Files must be separated using spaces.
/? Displays help at the command prompt.
Remarks
  • The following subcommands are accepted at the more prompt (-- More --), including:

    Key Action
    SPACEBAR Press the SPACEBAR to display the next screen.
    ENTER Press ENTER to display the file one line at a time.
    f Press F to display the next file listed on the command line.
    q Press Q to quit the more command.
    = Shows the line number.
    p <n> Press P to display the next n lines.
    s <n> Press S to skip the next n lines.
    ? Press ? to show the commands that are available at the more prompt.
  • If you use the redirection character (<), you must also specify a file name as the source.

  • If you use the pipe (|), you can use such commands as dir, sort, and type.

Examples

To view the first screen of information of a file named Clients.new, type one of the following commands:

more < clients.new
type clients.new | more

The more command displays the first screen of information from Clients.new, and you can press the SPACEBAR to see the next screen of information.

To clear the screen and remove all extra blank lines before displaying the file Clients.new, type one of the following commands:

more /c /s < clients.new
type clients.new | more /c /s

To display the current line number at the more prompt, type:

more =

The current line number is added to the more prompt, as -- More [Line: 24] --

To display a specific number of lines at the more prompt, type:

more p

The more prompt asks you for the number of lines to display, as follows: -- More -- Lines:. Type the number of lines to display, and then press ENTER. The screen changes to show only that number of lines.

To skip a specific number of lines at the more prompt, type:

more s

The more prompt asks you for the number of lines to skip, as follows: -- More -- Lines:. Type the number of lines to skip, and then press ENTER. The screen changes to show that those lines are skipped.

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 07/26/2019
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。