![Forrest logo](/images/logo.png)
more
The more
command line tool is a pager for viewing text files in a terminal window. It allows users to read through the contents of a file one page at a time, making it easier to navigate and review large files.
When running the more
command, the text file will open in the terminal, displaying the first page of the file. Users can use the Enter key to read through the file line by line or press the Spacebar to view the next page. The q
key can be used to quit the pager and return to the command prompt.
more
provides some additional functionality beyond simple paging. It allows users to search for specific text within the file using the forward slash (/) followed by the search term. Pressing n will move to the next occurrence of the search term, while pressing Shift+n will move to the previous occurrence.
Another useful feature of more
is the ability to scroll both forwards and backwards within the file. Users can press the b key to scroll up one page or the d key to scroll down one page.
By default, more
displays line numbers on the left side of the terminal window, showing the current line number and the total number of lines in the file. However, line numbers can be turned off by using the -x flag when running the more
command.
The more
command is available on most Unix-like systems, including Linux and macOS. It is a simple and efficient tool for viewing and navigating large text files in a terminal environment.
List of commands for more:
-
more:tldr:298e9 more: Open a file displaying from a specific line.$ more +${line_number} ${filename}try on your machineexplain this command
-
more:tldr:3d954 more: Clear the screen before displaying the page.$ more ${path\to\file} /ctry on your machineexplain this command
-
more:tldr:68a27 more: Display full usage information.$ more /?try on your machineexplain this command
-
more:tldr:ac84f more: Convert tabs to the specified number of spaces.$ more ${path\to\file} /t${spaces}try on your machineexplain this command
-
more:tldr:deb30 more: Enable extended interactive mode (see help for usage).$ more ${path\to\file} /etry on your machineexplain this command