😎
CS1.dev
  • Welcome to Computer Science 1
  • Unit 2
    • Activity 2.1
    • Activity 2.2
    • Activity 2.3
    • Activity 2.4
    • Activity 2.5
    • Activity 2.6
    • Activity 2.7
    • Activity 2.9
    • Activity 2.10
    • Project 2
    • Activity 2.8
    • Activity 2.11
    • Activity 2.12
    • Activity 2.13
    • Activity 2.14
    • Activity 2.15
    • Activity 2.16
    • Activity 2.17
    • Activity 2.18
    • Activity 2.19
    • Project 3
    • Activity 2.20
    • Activity 2.21
    • Activity 2.22
    • Activity 2.23
    • Activity 2.24
    • Project 4
    • Activity 2.25
    • Activity 2.26
    • Activity 2.27
    • Activity 2.28
    • Project 5
    • Activity 2.29
    • Activity 2.30
    • Activity 2.31
    • Activity 2.32
    • Activity 2.33
    • Activity 2.34
    • Activity 2.35
    • Activity 2.36
  • Unit 3
    • Activity 3.1
    • Activity 3.2
    • Activity 3.3
    • Activity 3.4
    • Activity 3.5
    • Activity 3.6
    • Activity 3.7
    • Activity 3.8
    • Activity 3.9
    • Activity 3.10
    • Activity 3.11
    • Project 6
    • Activity 3.12
  • Activity 3.13
  • Activity 3.14
  • Activity 3.15
  • Activity 3.16
  • Project 7
  • Activity 3.17
  • Activity 3.18
  • Activity 3.19
  • Project 8
  • Linux
    • bash
    • cat
    • cd
    • chmod
    • df
    • echo
    • find
    • grep
    • less
    • ls
    • mkdir
    • more
    • pwd
    • tar
    • touch
    • unzip
    • zip
Powered by GitBook
On this page
  1. Linux

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:

  1. 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.

  2. Navigation: Inside more, the primary way to navigate is by pressing the Spacebar to move forward one screen of content. You can also use the Enter key to advance line by line. However, unlike less, more does not support backward scrolling in the file.

  3. Viewing Command Output: more is often used to view the output of other commands in a paginated way. For example, ls -l | more would list the contents of a directory page by page.

  4. Search Functionality: You can perform a simple search within the displayed content in more by typing / followed by the search term and pressing Enter. However, its search capabilities are not as advanced as in less.

  5. Exit more: To exit from more, you press q.

  6. Limitations Compared to less:

    • No Backward Navigation: Unlike less, more does not allow you to scroll backwards. It only supports forward navigation.

    • Limited Search and Navigation Options: more has fewer options for searching and navigating compared to less.

  7. Historical Context: more predates less and was one of the first tools to provide a paginated viewing experience for text files and command output. less was later developed to include more features and capabilities, including backward navigation and a broader set of commands.

  8. Common Usage: Despite its limitations, more is still commonly used for quick viewing of files where backward navigation is not needed, particularly in scripts or systems where less might not be available.

PreviousmkdirNextpwd

Last updated 1 year ago