more
The more command in Linux is a command-line utility used for displaying text files and command outputs page by page in a terminal. It's one of the older utilities for this purpose, with functionality similar to less, albeit with some limitations. Here's an overview of the more command and its features:
Basic Functionality: To view a file in a paginated manner, you use
more filename. This opens the file and displays its content one screen at a time.Navigation: Inside
more, the primary way to navigate is by pressing theSpacebarto move forward one screen of content. You can also use theEnterkey to advance line by line. However, unlikeless,moredoes not support backward scrolling in the file.Viewing Command Output:
moreis often used to view the output of other commands in a paginated way. For example,ls -l | morewould list the contents of a directory page by page.Search Functionality: You can perform a simple search within the displayed content in
moreby typing/followed by the search term and pressing Enter. However, its search capabilities are not as advanced as inless.Exit
more: To exit frommore, you pressq.Limitations Compared to
less:No Backward Navigation: Unlike
less,moredoes not allow you to scroll backwards. It only supports forward navigation.Limited Search and Navigation Options:
morehas fewer options for searching and navigating compared toless.
Historical Context:
morepredateslessand was one of the first tools to provide a paginated viewing experience for text files and command output.lesswas later developed to include more features and capabilities, including backward navigation and a broader set of commands.Common Usage: Despite its limitations,
moreis still commonly used for quick viewing of files where backward navigation is not needed, particularly in scripts or systems wherelessmight not be available.
Last updated