ODOC: About more command
Displays text one screen at a time.
The more command in Linux is helpful when dealing with a small xterm window, or if you want to easily read a file without using an editor to do so. More is a filter for paging through text one screenful at a time.
more [-c] [-d] [-e] [-f] [-i] [-l] [-n number] [-p command] [-r] [-s] [-t tagstring] [-u] [-w] [ -lines ] [ + linenumber ] [ +/ pattern ] [ file … ]
-c -> Clear before displaying. Redraws the screen instead of scrolling for faster displays. This option is ignored if the terminal does not have the ability to clear to the end of a line.
-d -> Display error messages rather than ringing the terminal bell if an unrecognized command is used. This is helpful for inexperienced users.
-e -> Exit immediately after writing the last line of the last file in the argument list.
-f -> Do not fold long lines. This is useful when lines contain nonprinting characters or escape
sequences, such as those generated when nroff output is piped through ul.
-i -> Perform pattern matching in searches without regard to case.
-l -> Ignores form-feed characters (Ctrl + L starts the new page.)
-n number -> Specify the number of lines per screenful. The number argument is a positive decimal integer. The -n option overrides any values obtained from the environment.
-p command -> For each file examined, initially execute the more command in the command argument. If the command is a positioning command, such as a line number or a regular expression search, set the current position to represent the final results of the command, without writing any intermediate lines of the file.
-r -> Displays control keys.
-s -> Doesn’t display extra blank lines.
-t tagstring -> Write the screenful of the file containing the tag named by the tagstring argument.
-u -> Ignores backspace and underscores.
-w -> Normally, more exits when it comes to the end of its input. With -w, however, more prompts and waits for any key to be struck before exiting.
-lines -> Display the indicated number of lines in each screenful, rather than the default (the number of lines in the terminal screen less two).
+linenumber -> Start up at linenumber
+/pattern -> Displays text two lines before the first time text appears.
filename -> The name of the file.
praveen@praveen-desktop:~$ _ praveen@praveen-desktop:~$ myfile.txt
This will auto clear the screen and display the start of the file.
#!/bin/bash beep 659 120 # Treble E beep 0 120 beep 622 120 # Treble D# beep 0 120 --More--(5%) <---- This line shows at what line you have reached in the file relative to the entire file size.
If you press space, then more will move down the file the height of the terminal window you have open, to display new information to you.