What are other `more` command options?

The more command has several options that can enhance its functionality. Here are some commonly used options:

  1. -n: Specify the number of lines to display per screen. For example, more -n 15 filename.txt displays 15 lines per screen.

  2. -d: Display a message at the bottom of the screen to prompt the user to press the space bar to continue.

  3. -c: Clear the screen before displaying the next screen of text. This option is useful for readability.

  4. -s: Suppress repeated empty lines. This means that if there are multiple consecutive blank lines, only one will be displayed.

  5. -p: Similar to -c, but it does not clear the screen; instead, it pauses before displaying the next screen.

  6. -f: Treats the input as a file, allowing you to view files that are not regular text files.

  7. -V: Display the version information of the more command.

You can combine these options as needed. For example:

more -c -s filename.txt

This command will clear the screen before displaying the next screen of text and suppress repeated empty lines.

0 Comments

no data
Be the first to share your comment!