The more command has several options that can enhance its functionality. Here are some commonly used options:
-
-n: Specify the number of lines to display per screen. For example,more -n 15 filename.txtdisplays 15 lines per screen. -
-d: Display a message at the bottom of the screen to prompt the user to press the space bar to continue. -
-c: Clear the screen before displaying the next screen of text. This option is useful for readability. -
-s: Suppress repeated empty lines. This means that if there are multiple consecutive blank lines, only one will be displayed. -
-p: Similar to-c, but it does not clear the screen; instead, it pauses before displaying the next screen. -
-f: Treats the input as a file, allowing you to view files that are not regular text files. -
-V: Display the version information of themorecommand.
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.
