1
Linux常用命令-35:more
source link: https://xugaoxiang.com/2022/06/10/linux-cmds-35-more/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
more
命令类似于 less
,也是用于大文件的分页显示,不过功能上没有 less
丰富。对于小文件可以使用 cat
。
语法格式:more [参数] [文件]
常用参数:
# 查看文件test.py,在左下角会有显示内容的百分比
more test.py
# 从第10行开始显示
more +10 test.py
# 先清除屏幕内容,然后从第10行开始显示
more -p +10 test.py
# 一页只显示10行,包括文件中的空行
more -c -10 test.py
进入 more
命令后,还有些指令可以使用
- 空格键,显示文本的下一屏内容
- 回车键,向下显示1行
h
,显示帮助屏b
,显示上一屏内容q
,退出more
=
,输出当前的行号
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK