most - browse or page through a text file
[1mmost [22m[[1m-1bCcMstuvwz[22m] [[1m+[4m[22mlineno[24m] [[1m+c[22m] [[1m+d[22m] [[1m+s[22m] [[1m+u[22m] [[1m+/[4m[22mstring[24m] [[4mfile-[0m
[4mmost[24m 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, [4mmost[24m is capable of displaying an arbi-
trary 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. [4mmost[24m 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 `[1m:o[22m' command
for a description of this feature.
In addition to displaying ordinary text files, [4mmost[24m can also display
binary files as well as files with arbitrary ascii characters. When a
file is read into a buffer, [4mmost[24m 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 [1m-k[0m
option. See the description of the [1m-b[22m, [1m-k[22m, [1m-v[22m, and [1m-t [22moptions for fur-
Text files may contain combinations of underscore and backspace charac-
ters causing a printer to underline or overstrike. When [4mmost[24m recog-
nizes this, it inserts the appropriate escape sequences to achieve the
desired effect. In addition, some files cause the printer to over-
strike some characters by embedding carriage return characters in the
middle of a line. When this occurs, [4mmost[24m displays the overstruck char-
acter with a bold attribute. This feature facilitates the reading of
UNIX man pages or a document produced by [4mrunoff[24m. In particular, view-
ing this document with [4mmost[24m should illustrate this behavior provided
that the underline characters have not been stripped. This may be
turned off with the [1m-v [22moption.
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 [1m-w [22moption 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.
[1m-1 [22mVT100 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.
[1m-b [22mBinary mode. Use this switch when you want to view files con-
taining 8 bit characters. [4mmost[24m will display the file 16 bytes
per line in hexadecimal notation. A typical line looks like:
01000000 40001575 9C23A020 4000168D ....@..u.#. @...
When used with the [1m-v [22moption, the same line looks like:
^A^@^@^@ @^@^U u 9C #A0 @^@^V8D ....@..u.#. @...
[1m-C [22mDisable color support.
[1m-M [22mDisable the use of mmap.
[1m-s [22mSqueeze. Replace multiple blank lines with a single blank line.
[1m-z [22moption turns off gunzip-on-the-fly.
[1m-v [22mDisplay control characters as in `^A' for control A. Normally
[4mmost[24m does not interpret control characters.
[1m-t [22mDisplay tabs as `^I'. This option is meaningful only when used
with the [1m-v [22moption.
Start up at [4mlineno[24m.
[1m-c [22mMake searches case sensitive. By default, they are not.
[1m-u [22mDisable UTF-8 mode even if the locale dictates it.
[1m+u [22mForce UTF-8 mode. By default most will use the current locale
to determine if UTF-8 mode shoul be used. The [1m+u [22mand [1m-u[0m
switches allow the behavior to be overridden.
[1m+d [22mThis 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 interac-
tive key sequence `[1m:D[22m' and then confirming with `[1my[22m'.
Start up at the line containing the first occurrence of [4mstring[24m.
The commands take effect immediately; it is not necessary to type a
In the following commands, [4mi[24m is a numerical argument (1 by default).
[1mSPACE[22m, [1mCTRL-D[22m, [1mNEXT_SCREEN[0m
Display another windowful, or jump [4mi[24m windowfuls if [4mi[24m is speci-
[1mRETURN[22m, [1mDOWN_ARROW[22m, [1mV[22m, [1mCTRL-N[0m
Display another line, or [4mi[24m more lines, if specified.
[1mUP_ARROW[22m, [1m^[22m, [1mCTRL-P[0m
Display previous line, or [4mi[24m previous lines, if specified.
Move to top of buffer.
Move to bottom of buffer.
[1mRIGHT_ARROW[22m, [1mTAB[22m, [1m>[0m
Scroll window left 60[4mi[24m columns to view lines that are beyond the
right margin of the window.
[1mLEFT_ARROW[22m, [1mCTRL-B[22m, [1m<[0m
Scroll window right 60[4mi[24m columns to view lines that are beyond
the left margin of the window.
[1mU[22m, [1mCTRL-U[22m, [1mDELETE[22m, [1mPREV_SCREEN[0m
Skip back [4mi[24m windowfuls and then print a windowful.
Redraw the window.
[1mJ[22m, [1mG [22mIf [4mi[24m is not specified, then prompt for a line number then jump
to that line otherwise just jump to line [4mi[24m.
[1m% [22mIf [4mi[24m is not specified, then prompt for a percent number then
jump to that percent of the file otherwise just jump to [4mi[24m per-
cent of the file.
[1mW[22m, [1mw [22mIf the current screen width is 80, make it 132 and vice-versa.
For other values, this command is ignored.
[1mQ[22m, [1mCTRL-X CTRL-C[22m, [1mCTRL-K E[0m
Exit from [4mmost[24m. On VMS, ^Z also exits.
[1mh[22m, [1mCTRL-H[22m, [1mHELP[22m, [1mPF2[0m
Help. Give a description of all the [4mmost[24m commands. The [4mmost[0m
environment variable [1mMOST_HELP [22mmust be set for this to be mean-
[1mf[22m, [1m/[22m, [1mCTRL-F[22m, [1mFIND[22m, [1mGOLD PF3[0m
Prompt for a string and search forward from the current line for
[4mi[24mth distinct line containing the string. [1mCTRL-G [22maborts.
[1m? [22mPrompt for a string and search backward for the [4mi[24mth distinct
line containing the string. [1mCTRL-G [22maborts.
[1mn [22mSearch for the next [4mi[24m lines containing an occurrence of the last
search string in the direction of the previous search.
[1mm[22m, [1mSELECT[22m, [1mCTRL-@[22m, [1mCTRL-K M[22m, [1mPERIOD[0m
Set a mark on the current line for later reference.
[1mINSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD[0m
Set a mark on the current line but return to previous mark.
This allows the user to toggle back and forth between two posi-
tions in the file.
[1ml[22m, [1mL [22mToggle 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.
[1mCTRL-X 2[22m, [1mCTRL-W 2[22m, [1mGOLD X[0m
Split this window in half.
[1mCTRL-X o[22m, [1mCTRL-W o[22m, [1mo[22m, [1mGOLD[22mUP[1m, [22mGOLD[1mDOWN[0m
Move to other window.
[1mCTRL-X 0[22m, [1mCTRL-W 0[22m, [1mGOLD V[0m
Delete this window.
[1mCTRL-X 1[22m, [1mCTRL-W 1[22m, [1mGOLD O[0m
Delete all other windows, leaving only one window.
[1mE[22m, [1me [22mEdit this file.
[1m$[22m, [1mESC $[0m
This is system dependent. On VMS, this causes [4mmost[24m to spawn a
subprocess. When the user exits the process, [4mmost[24m is resumed.
On UNIX systems, [4mmost[24m simply suspends itself.
[1m:n [22mSkip to the next filename given in the command line. Use the
arrow keys to scroll forward or backward through the file list.
`[1mQ[22m' quits [4mmost[24m and any other key selects the given file.
[1m:c [22mToggle case sensitive search.
[1m:D [22mDelete current file. This command is only meaningful with the
[1m:o[22m, [1m:O [22mToggle various options. With this key sequence, [4mmost[24m displays a
prompt asking the user to hit one of: [1mbdtvw[22m. The `[1mb[22m', `[1mt[22m', `[1mv[22m',
and `[1mw[22m' options have the same meaning as the command line
switches. For example, the `[1mw[22m' option will toggle wrapping on
and off for the current window.
The `[1md[22m' option must be used with a prefix integer [4mi[24m. All lines
indented beyond [4mi[24m columns will not be displayed. For example,
consider the fragment:
int main(int argc, char **argv)
for (i = 0; i < argc, i++)
The key sequence `[1m1:od[22m' will cause [4mmost[24m to display the file
ignoring all lines indented beyond the first column. So for the
example above, [4mmost[24m would display:
int main(int argc, char **argv)...
where the `...' indicates lines follow are not displayed.
[1mCTRL-G [22maborts 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 occur-
rence 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 [1m`^JThe [22mwhere [1m` [22mquotes the [1mCTRL-J[22m.
[4mmost[24m uses the following environment variables:
This variable sets commonly used switches. For example, some
people prefer to use [4mmost[24m with the [1m-s [22moption so that excess
blank lines are not displayed. On VMS this is normally done
done in the login.com through the line:
$ define MOST_SWITCHES "-s"
Either of these environment variables specify an editor for [4mmost[0m
to invoke to edit a file. The value can contain %s and %d for-
matting descriptors that represent the file name and line num-
ber, respectively. For example, if JED is your editor, then set
[1mMOST_EDITOR [22mto 'jed %s -g %d'.
This variable may be used to specify an alternate help file.
Set this variable to specify the initialization file to load
during startup. The default action is to load the system con-
figuration file and then a personal configuration file called
[4m.mostrc[24m on Unix, and [4mmost.rc[24m on other systems.
[1mCONFIGURATION FILE SYNTAX[0m
When most starts up, it tries to read a system configuration 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:
[1msetkey function-name key-sequence[0m
The [4msetkey[24m command requires two arguments. The [4mfunction-name[24m argument
specifies the function that is to be executed as a response to the keys
specified by the [4mkey-sequence[24m argument are pressed. For example,
setkey "up" "^P"
indicates that when [4mCtrl-P[24m is pressed then the function [4mup[24m is to be
Sometimes, it is necessary to first unbind a key-sequence before
rebinding it in order via the [4munsetkey[24m function:
Colors may be defined through the use of the [4mcolor[24m keyword in the the
configuration file using the syntax:
[1mcolor OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR[0m
Here, OBJECT-NAME can be any one of the following items:
status -- the status line
underline -- underlined text
overstrike -- overstriked text
normal -- anything else
See the sample configuration files for more information.
Almost all of the known bugs or limitations of [4mmost[24m are due to a desire
to read and interpret control characters in files. One problem con-
cerns the use of backspace characters to underscore or overstrike other
characters. [4mmost[24m 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 [1m-v [22mand [1m-b [22moptions of [4mmost[24m.
John E. Davis
I would like to thank the users of [4mmost[24m for valuable comments and crit-
icisms. I would especially like to thank those individuals who have
contributed code to [4mmost.[0m
Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark Pizzolato
contributed to the early VMS versions of [4mmost.[24m In particular, Mark
worked on it to get it ready for DECUS.
Foteos Macrides <MACRIDES@SCI.WFEB.EDU> adapted [4mmost[24m for use in [4mcswing[0m
and [4mgopher.[24m A few features of the present version of [4mmost[24m was inspired
from his work.
I am grateful to Robert Mills <email@example.com> for re-writing the
search routines to use regular expressions.
Sven Oliver Moll <firstname.lastname@example.org> came up with the idea
of automatic detection of zipped files.
I would also like to thank Shinichi Hama for his valuable criticisms of
Javier Kohen was instrumental in the support for UTF-8.
Thanks to David W. Sanderson (email@example.com) for adapting the docu-
mentation to nroff man page source format.
May 1999 MOST(1)