more命令
来源:原创 更新时间:2018-08-26 00:34:25 作者:管理员 浏览:2155
- 命令描述
该命令一次显示一屏文本,满屏后停下来,并且在屏幕的底部出现一个提示信息,给出至今己显示的该文件的百分比:--More--(XX%)可以用下列不同的方法对提示做出回答:
按Space键:显示文本的下一屏内容。
按Enier键:只显示文本的下一行内容。
按斜线符|:接着输入一个模式,可以在文本中寻找下一个相匹配的模式。
按H键:显示帮助屏,该屏上有相关的帮助信息。
按B键:显示上一屏内容。
按Q键:退出rnore命令。
- 命令语法
- 命令选项
-d:显示“[press space to continue,'q' to quit.]”和“[Press 'h' for instructions]”;
-c:不进行滚屏操作。每次刷新这个屏幕;
-s:将多个空行压缩成一行显示;
-u:禁止下划线;
+<数字>:从指定数字的行开始显示。
- 命令参数
- 命令实例
实例1:more 查看文件
[root@linuxbaodian files]# more 01.txt She had been shopping with her Mom in Wal-Mart. She must have been 6 years old, this beautiful brown haired, freckle-faced image of innocence. What? Mom asked.Let's run through the rain! She repeated. No, honey. We'll wait until it slows down a bit. Mom replied. Don't you remember? When you were talking to Daddy about his cancer, you said, If God can get us through this, he can get us through anything! This young child waited about another minute and repeated: "Mom, let's run through the rain." We'll get soaked if we do. Mom said. No, we won't, Mom. That's not what you said this morning, the young girl said as she tugged at her Mom's arm."
实例2: 查看文件前先清屏
[root@linuxbaodian files]# more -c 10 01.txt 10: No such file or directory--More--(Next file: 01.txt) She had been shopping with her Mom in Wal-Mart. She must have been 6 years old, this beautiful brown haired, freckle-faced image of innocence. What? Mom asked.Let's run through the rain! She repeated. No, honey. We'll wait until it slows down a bit. Mom replied. Don't you remember? When you were talking to Daddy about his cancer, you said, If God can get us through this, he can get us through anything! This young child waited about another minute and repeated: "Mom, let's run through the rain." She must have been 6 years old, this beautiful brown haired, freckle-faced image of innocence. What? Mom asked.Let's run through the rain! She repeated. No, honey. We'll wait until it slows down a bit. Mom replied. Don't you remember? When you were talking to Daddy about his cancer, you said, If God can get us through this, he can get us through anything! This young child waited about another minute and repeated: "Mom, let's run through the rain." We'll get soaked if we do. Mom said. No, we won't, Mom. That's not what you said this morning, the young girl said as she tugged at her Mom's arm."