Terminal Pager
The terminal pager has been mentioned often in my reading about software engineering / computer science, so I figure I will try to learn more about it.
References
Notes
A terminal pager, paging program, or simply pager is a computer program used to view (but not modify) the contents of a text file moving down the file one line or one screen at a time. Some, but not all, pagers move forwards and backwards in text files but cannot move backwards in pipes. less
is a more advanced pager that allows movement forward and backward, and conations extra functions such as search.
Examples
more
- Command to view (but not modify) the contents of a text file one screen at a time, available in Unix and Unix-like systems.
$ more [options] [file_name]
- If no file name is provided,
more
looks for input from standard input. - In the lower-left corner of the screen is displayed the text
--More--
and a percentage, representing the percent of the file thatmore
has paged through. - When
more
reaches the end of a file, it exits. - The most common methods of navigating through a file are Enter, which advances the output by one line, and SPACE, which advances the output by one screen.
- Options
--num
- option specifies an integer which is the screen size in lines-d
-causes the program to prompt the user with a message instead of ringing the bell when an illegal key is pressed-f
-causes the program to count logical rather than screen lines-p
-do not scroll, clear the screen and display the text-c
-do not scroll. paint each screen from the top, clearing the remainder of each line as it is displayed-s
-squeeze multiple blank lines into one-u
- backspace and carriage return are treated as printable characters+/
-specifies a string that will be searched before each file is displayed+num
- start at line numbernum
- If no file name is provided,
less
- Similar to
more
, but allows for backwards navigation.
- Similar to
$ less [options] [file_name]...
pg
- Was a terminal pager for text files, but it has been removed.
most
- similar to
less
in capabilities
- similar to
nano --view
- text editor for Unix-like computing systems or operating environments using a command line interface
emacs -nw -e "(view-mode)"
- family of text editors that are characterized by their extensibility
w3m
- free and open source text-based web browser licensed under the MIT license.
- It differs form other text based browsers by supporting elements such as tables, frames, and images.
Comments
You can read more about how comments are sorted in this blog post.
User Comments
There are currently no comments for this article.