In Linux systems, more
and cat
are both commands used to display the contents of text files, but there are some differences between them.
The cat
command (concatenate) is usually used to display the contents of a file in its original form, and will output the contents of the entire file to the terminal at once. For example:
cat filename
This will display the contents of the entire file on the terminal.
The and more
commands are used to display the file content page by page. For example, when you are viewing a long file, you can use the more
command to display only one page at a time. Press the space bar to display the next page. Press q
key to exit. For example:
more filename
Since more
provides the function of displaying page by page, it can usually handle large files better and also supports page forward operation.