- Open a file:most [path/to/file]- Open several files:most [path/to/file1] [path/to/file2]- Open a file at the first occurrence of "string":most [file] +/[string]- Move through opened files::O n- Jump to the 100th line:j- Edit current file:e- Split the current window in half: o- Exit:Q
most [-1bCckMstvwz] [+lineno] [+c] [+d] [+s] [+/string] [filename...]
most is a paging program that displays, one windowful at a time, the contents of a file on a terminal. It pauses after each windowful and prints on the window status line the screen the file name, current line number, and the percentage of the file so far displayed.
Unlike other paging programs, most is capable of displaying an arbitrary number of windows as long as each window occupies at least two screen lines. Each window may contain the same file or a different file. In addition, each window has its own mode. For example, one window may display a file with its lines wrapped while another may be truncating the lines. Windows may be 'locked' together in the sense that if one of the locked windows scrolls, all locked windows will scroll. most is also capable of ignoring lines that are indented beyond a user specified value. This is useful when viewing computer programs to pick out gross features of the code. See the ':o' command for a description of this feature.
In addition to displaying ordinary text files, most can also display binary files as well as files with arbitrary ascii characters. When a file is read into a buffer, most examines the first 32 bytes of the file to determine if the file is a binary file and then switches to the appropriate mode. However, this feature may be disabled with the -k option. See the description of the -b, -k, -v, and -t options for further details.
Text files may contain combinations of underscore and backspace characters causing a printer to underline or overstrike. When most recognizes this, it inserts the appropriate escape sequences to achieve the desired effect. In addition, some files cause the printer to overstrike some characters by embedding carriage return characters in the middle of a line. When this occurs, most displays the overstruck character with a bold attribute. This feature facilitates the reading of UNIX man pages or a document produced by runoff. In particular, viewing this document with most should illustrate this behavior provided that the underline characters have not been stripped. This may be turned off with the -v option.
By default, lines with more characters than the terminal width are not wrapped but are instead truncated. When truncation occurs, this is indicated by a '$' in the far right column of the terminal screen. The RIGHT and LEFT arrow keys may be used to view lines which extend past the margins of the screen. The -w option may be used to override this feature. When a window is wrapped, the character '\' will appear at the right edge of the window.
Commands are listed below.
VT100 mode. This is meaningful only on VMS systems. This option should be used if the terminal is strictly a VT100. This implies that the terminal does not have the ability to delete and insert multiple lines. VT102s and above have this ability.
Binary mode. Use this switch when you want to view files containing 8 bit characters. most will display the file 16 bytes per line in hexidecimal notation. A typical line looks like:
^A^@^@^@ @^@^U u 9C #A0 @^@^V8D ....@..u.#. @...
'Kanji' option. Ordinarily, most will go into binary mode if the file consists of non-ascii characters. Sometimes this feature is not desirable since some terminals have a special interpretation for eight bit characters. The -k option turns off the automatic sensing.
Disable color support.
Disable the use of mmap.
Squeeze. Replace multiple blank lines with a single blank line.
option turns off gunzip-on-the-fly.
Display control characters as in '^A' for control A. Normally most does not interpret control characters.
Display tabs as '^I'. This option is meaningful only when used with the -v option. +lineno Start up at lineno.
Make search case sensitive. By default, they are not.
This switch should only be used if you want the option to delete a file while viewing it. This makes it easier to clean unwanted files out of a directory. The file is deleted with the interactive key sequence ':D' and then confirming with 'y'.
The commands take effect immediately; it is not necessary to type a carriage return.
In the following commands, i is a numerical argument (1 by default).
If i is not specified, then prompt for a line number then jump to that line otherwise just jump to line i.
If i is not specified, then prompt for a percent number then jump to that percent of the file otherwise just jump to i percent of the file.
If the current screen width is 80, make it 132 and vice-versa. For other values, this command is ignored.
Prompt for a string and search backward for the ith distinct line containing the string. CTRL-G aborts.
Search for the next i lines containing an occurrence of the last search string in the direction of the previous search.
Toggle locking for this window. The window is locked if there is a '*' at the left edge of the status line. Windows locked together, scroll together.
Edit this file.
Skip to the next filename given in the command line. Use the arrow keys to scroll forward or backward through the file list. 'Q' quits most and any other key selects the given file.
Toggle case sensitive search.
Delete current file. This command is only meaningful with the +d switch.
Toggle various options. With this key sequence, most displays a prompt asking the user to hit one of: bdtvw. The 'b', 't', 'v', and 'w' options have the same meaning as the command line switches. For example, the 'w' option will toggle wrapping on and off for the current window.
for (i = 0; i < argc, i++)
int main(int argc, char **argv)... }
CTRL-G aborts the commands requiring the user to type something in at a prompt. The backquote key has a special meaning here. It is used to quote certain characters. This is useful when search for the occurrence of a string with a control character or a string at the beginning of a line. In the latter case, to find the occurrence of 'The' at the beginning of a line, enter '^JThe where ' quotes the CTRL-J.
most uses the following environment variables:
$ define MOST_SWITCHES "-s"
When most starts up, it tries to read a system confiuration file and then a personal configuration file. These files may be used to specify keybindings and colors.
To bind a key to a particular function use the syntax:
setkey function-name key-sequence
The setkey command requires two arguments. The function-name argument specifies the function that is to be executed as a response to the keys specified by the key-sequence argument are pressed. For example,
setkey "up" "^P"
indicates that when Ctrl-P is pressed then the function up is to be executed.
Sometimes, it is necessary to first unbind a key-sequence before rebinding it in order via the unsetkey function:
Colors may be defined through the use of the color keyword in the the configuration file using the syntax:
color OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR
Here, OBJECT-NAME can be any one of the following items:
status -- the status line underline -- underlined text overstrike -- overstriked text normal -- anything else
Almost all of the known bugs or limitations of most are due to a desire to read and interpret control characters in files. One problem concerns the use of backspace characters to underscore or overstrike other characters. most makes an attempt to use terminal escape sequences to simulate this behavior. One side effect is the one does not always get what one expects when scrolling right and left through a file. When in doubt, use the -v and -b options of most.
John E. Davis email@example.com
I would like to thank the users of most for valuable comments and criticisms. I would especially like to thank those individuals who have contributed code to most.
Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark Pizzolato contributed to the early VMS versions of most. In particular, Mark worked on it to get it ready for DECUS.
Foteos Macrides <MACRIDES@SCI.WFEB.EDU> adapted most for use in cswing and gopher. A few features of the present version of most was inspired from his work.
I am grateful to Robert Mills <firstname.lastname@example.org> for re-writing the search routines to use regular expressions.
Sven Oliver Moll <email@example.com> came up with the idea of automatic detection of zipped files.
I would also like to thank Shinichi Hama for his valuable criticisms of most.
Thanks to David W. Sanderson (firstname.lastname@example.org) for adapting the documentation to nroff man page source format.