MORE 逐屏显示输出

MORE 逐屏显示输出 

帮助信息

C:\Users\Administrator> more /?
逐屏显示输出。

MORE [/E [/C] [/P] [/S] [/Tn] [+n]] < [drive:][path]filename
command-name | MORE [/E [/C] [/P] [/S] [/Tn] [+n]]
MORE /E [/C] [/P] [/S] [/Tn] [+n] [files]

[drive:][path]filename 指定要逐屏显示的文件。

command-name 指定要显示其输出的命令。

/E   启用扩展功能
/C   显示页面前先清除屏幕
/P   扩展 FormFeed 字符
/S   将多个空白行缩成一行
/Tn  将制表符扩展为 n 个空格(默认值为 8) 开关可以出现在 MORE 环境变量中。
     +n 从第 n 行开始显示第一个文件要显示的文件列表。使用空格分隔列表中的文件。

如果已启用扩展功能,则在出现 More 提示时接受下列命令:
P n 显示下 n 行
S n 跳过下 n 行
F 显示下个文件
Q 退出
= 显示行号
? 显示帮助行
<space>显示下一页
<ret>显示下一行

简单示例

(1)使用 more 命令分屏查看 right_here_waiting.txt 文件内容,如下图:

(2)在使用 more 命令查看文件内容前清空当前屏幕,如下图:

(3)使用 /S 选项,将多个空白行缩成一行,例如:

C:\Users\Administrator\Desktop>more right_here_waiting.txt /S
Oceans apart day after day
And I slowly go insane

I hear your voice on the line
But it doesn't stop the pain
If I see you next to never
...
Oh can't you see it baby
You've got me goin' crazy
Wherever you go
Whatever you do
I will be right here waiting for you
-- More (60%) --

(4)将另一个命令的输出作为more的输入,分屏显示命令的输出信息,如下:

C:\Users\Administrator\Desktop>type right_here_waiting.txt | more
Oceans apart day after day
And I slowly go insane



I hear your voice on the line
But it doesn't stop the pain
...
I will be right here waiting for you
-- More  --

(5)more 命令开启扩展功能,如下图:

关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号