more Command: Tutorial & Examples

View the contents of a file one page at a time

The more command is a utility that is used to view text files in a terminal window. It allows you to view the file one page at a time and navigate through the file using the space bar to move forward and the b key to move backward.

To view a file with more, simply type more followed by the name of the file:

more file.txt

This will open the file in more and display the first page of the file.

more is often used in conjunction with other commands, such as grep or tail, to filter and process the output of those commands before viewing it in more. For example, you can use more to view the /var/log/messages file by piping the output of cat to more:

cat /var/log/messages | more

more is a simple and straightforward tool for viewing text files on a Linux system. It is often used as an alternative to the less command, which has more features. We recommend that you use less instead of more.

Except where otherwise noted, content on this site is licensed under a CC BY-SA 4.0 license CC BY SA