Linux common commands-35: more

The more command is similar to less , and is also used for paging display of large files, but it is not as rich in functions as less . For small files you can use cat .

Syntax format: more [parameter] [file]

Common parameters:

Example

 # 查看文件test.py,在左下角会有显示内容的百分比more test.py # 从第10行开始显示more +10 test.py # 先清除屏幕内容,然后从第10行开始显示more -p +10 test.py # 一页只显示10行,包括文件中的空行more -c -10 test.py

After entering the more command, there are still some commands that can be used

  • Spacebar, display the next screen of text
  • Enter key, display 1 line down
  • h , display the help screen
  • b , display the content of the previous screen
  • q , exit more
  • = , output the current line number

This article is reprinted from https://xugaoxiang.com/2022/06/10/linux-cmds-35-more/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment