MOST(1)
π most(1) π β the manual page, bestie edition
okay so you opened the MOST(1) man page and you want the tea. good. we're doing this properly, no skipping, no summarising, every flag stays. let's go π
π NAME π
most β browse or page through a text file. that's it. that's the whole job. and it does it iconically.
β¨ SYNOPSIS β¨
most [ -1 ] [ -b ] [ -C ] [ -c ] [ -d ] [ -M ] [ -r ] [ -s ] [ -t ] [ -u ] [ -v ] [ -w ] [ -z ] [ +/string ] [ +line-number ] [ +d ] [ +s ] [ +u ] [ file... ]
π DESCRIPTION π
so most is a paging program β meaning it shows you the contents of a file on your terminal, one windowful at a time. after each windowful it pauses, and it prints on the window status line the screen, the file name, the current line number, and the percentage of the file you've seen so far. very "where am i in this document" of it. slay.
and here's where it eats and leaves no crumbs: unlike other paging programs, most can display an arbitrary number of windows as long as each window takes up at least two screen lines. each window can hold the same file or a different file. and every window has its own mode, like fr fr β one window might display a file with its lines wrapped, while another might be truncating the lines. windows may be locked together, meaning if one of the locked windows scrolls, all the locked windows scroll. it's giving synchronized swimming. π¦
most can also straight up ignore lines that are indented beyond a value you specify. super useful when you're viewing computer programs and you just want the gross features of the code, not every nested little detail. go read the :o command below for the full description of that feature.
and it's not just plain text files either β most can display binary files as well as files with arbitrary ascii characters. when a file gets read into a buffer, most examines the first 32 bytes of the file to figure out if it's a binary file, and then it switches to the appropriate mode. that said, you can disable this whole thing with the -k option. see the descriptions of -b, -k, -v, and -t for more.
text files may contain combinations of underscore and backspace characters β the kind of thing that makes a printer underline or overstrike. when most recognizes that, it inserts the appropriate escape sequences to get the effect you want. also, some files cause the printer to overstrike some characters by embedding carriage return characters in the middle of a line. when that happens, most displays the overstruck character with a bold attribute. this is what makes reading UNIX man pages or a document produced by runoff actually pleasant. in particular, viewing this document with most should illustrate this behavior, provided the underline characters haven't been stripped. you can turn it all off with -v.
by default, lines with more characters than the terminal width are not wrapped β they get truncated instead. when truncation happens, it's indicated by a $ in the far right column of the terminal screen. the RIGHT and LEFT arrow keys let you view lines that extend past the margins of the screen. the -w option overrides this whole feature. and when a window is wrapped, the character \ will appear at the right edge of the window. π
commands are listed below. π
π COLOR SUPPORT π
most has supported both 256-color and 24 bit truecolor terminals since version 5.2. not all terminals are capable of generating arbitrary 24 bit colors though. so if your terminal does support 24 bit colors, but most doesn't detect it, then set the environment variable
COLORTERM=truecolor
to force 24 bit truecolors to be used. easy. β¨
π OPTIONS π
-1β VT100 mode. this is only meaningful on VMS systems, okay? use this option if your terminal is strictly a VT100. it implies the terminal doesn't have the ability to delete and insert multiple lines. VT102s and above do have that ability, so they don't need this.-bβ Binary mode. use this switch when you want to view files containing 8 bit characters.mostwill display the file 16 bytes per line in hexadecimal notation. a typical line looks like:
01000000 40001575 9C23A020 4000168D ....@..u.#. @...
when used with the -v option, that same line looks like:
^A^@^@^@ @^@^U u 9C #A0 @^@^V8D ....@..u.#. @...
-Cβ Disable color support. sorry to the color lovers. π-cβ Make searches case-sensitive.-dβ Omit the backslash mark used to denote a wrapped line.-Mβ Disable the use ofmmap.-rβ Default to using regexp searches.-sβ Squeeze-mode. replaces multiple blank lines with a single blank line. so much tidier.-tβ Display tabs as^I. if this option is immediately followed by an integer, that integer sets the tab width, e.g.,-t4.-uβ Disable UTF-8 mode even if the locale dictates it.+uβ Force UTF-8 mode. by defaultmostuses the current locale to determine whether UTF-8 mode should be used. the+uand-uswitches let you override that behavior.-vβ Display control characters as in^Afor control A. normallymostdoesn't interpret control characters.-wβ Wrap lines. π-zβ Disable gunzip-on-the-fly.+/stringβ Start up at the line containing the first occurrence of string.+linenoβ Start up at the specified line-number.+dβ this switch should only be used if you want the option to delete a file while viewing it. it makes it easier to clean unwanted files out of a directory. the file is deleted with the interactive key sequence:Dand then confirming withy.+sβ Secure Mode β no edit, cd, shell, and reading files not already listed on the command line. locked down, respectfully. π
π«Ά COMMAND USAGE π«Ά
the commands take effect immediately; you do not need to type a carriage return. so don't sit there waiting, bestie. in the following commands, i is a numerical argument (1 by default).
- SPACE, CTRL-D, NEXT_SCREEN β Display another windowful, or jump
iwindowfuls ifiis specified. - RETURN, DOWN_ARROW, V, CTRL-N β Display another line, or
imore lines, if specified. - UP_ARROW, ^, CTRL-P β Display previous line, or
iprevious lines, if specified. - T, ESCAPE< β Move to top of buffer.
- B, ESCAPE> β Move to bottom of buffer.
- RIGHT_ARROW, TAB, > β Scroll window left
60icolumns to view lines that are beyond the right margin of the window. - LEFT_ARROW, CTRL-B, < β Scroll window right
60icolumns to view lines that are beyond the left margin of the window. - U, CTRL-U, DELETE, PREV_SCREEN β Skip back
iwindowfuls and then print a windowful. - R, CTRL-R β Redraw the window.
- J, G β if
iis not specified, then prompt for a line number then jump to that line; otherwise just jump to linei. - % β if
iis not specified, then prompt for a percent number then jump to that percent of the file; otherwise just jump toipercent of the file. - W, w β if the current screen width is
80, make it132and vice-versa. for other values, this command is ignored. - Q, CTRL-X CTRL-C, CTRL-K E β Exit from
most. on VMS,^Zalso exits. - h, CTRL-H, HELP, PF2 β Help. gives a description of all the
mostcommands. the most environment variableMOST_HELPmust be set for this to be meaningful. - f, /, CTRL-F, FIND, GOLD PF3 β Prompt for a string and search forward from the current line for the
ith distinct line containing the string.CTRL-Gaborts. - ? β Prompt for a string and search backward for the
ith distinct line containing the string.CTRL-Gaborts. - n β Search for the next
ilines containing an occurrence of the last search string, in the direction of the previous search. - m, SELECT, CTRL-@, CTRL-K M, PERIOD β Set a mark on the current line for later reference.
- INSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD β Set a mark on the current line but return to the previous mark. this lets you toggle back and forth between two positions in the file. main character energy, bouncing between plot points. π
- l, L β 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. - CTRL-X 2, CTRL-W 2, GOLD X β Split this window in half.
- CTRL-X o, CTRL-W o, o, GOLDUP, GOLDDOWN β Move to other window.
- CTRL-X 0, CTRL-W 0, GOLD V β Delete this window.
- CTRL-X 1, CTRL-W 1, GOLD O β Delete all other windows, leaving only one window.
- E, e β Edit this file.
- $, ESC $ β This is system dependent. on VMS, this causes
mostto spawn a subprocess; when the user exits the process,mostis resumed. on UNIX systems,mostsimply suspends itself. - :n β Skip to the next filename given in the command line. use the arrow keys to scroll forward or backward through the file list.
Qquitsmostand any other key selects the given file. - :c β Toggle case sensitive search.
- :D β Delete current file. this command is only meaningful with the
+dswitch. - :o, :O β Toggle various options. with this key sequence,
mostdisplays a prompt asking the user to hit one of:bdtvw. theb,t,v, andwoptions have the same meaning as the command line switches. for example, thewoption will toggle wrapping on and off for the current window.
the d option must be used with a prefix integer i. all lines indented beyond i columns will not be displayed. for example, consider the fragment:
int main(int argc, char **argv)
{
int i;
for (i = 0; i < argc, i++)
{
fprintf(stdout,"%i: %s\n",i,argv[i]);
}
return 0;
}
the key sequence 1:od will cause most to display the file ignoring all lines indented beyond the first column. so for the example above, most would display:
int main(int argc, char **argv)...
}
where the ... indicates lines that follow are not displayed. so clean. so minimal. we love a filtered feed. πΈ
π§ HINTS π§
CTRL-G aborts the commands that require you to type something in at a prompt. and the back-quote key has a special meaning here β it's used to quote certain characters. this is useful when you're searching 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. iykyk. π
π«Ά ENVIRONMENT π«Ά
okay so most reads a lil set of environment variables, and they're all lowkey iconic, so let's go:
MOST_SWITCHESβ this one is your "defaults but make it permanent" bestie. It sets switches you use all the time. Like, some people are obsessed with runningmostwith the-soption so that excess blank lines are not displayed (groundbreaking, honestly). On VMS this is normally done inlogin.comthrough the line:
$ define MOST_SWITCHES "-s"
MOST_EDITOR,SLANG_EDITORβ either of these two tellsmostwhich editor to invoke when you wanna edit a file. The value can contain%sand%dformatting descriptors that stand for the file name and the line number, respectively (so fancy β¨). For example, if JED is your editor, then setMOST_EDITORto'jed %s -g %d'.MOST_HELPβ use this one to point at an alternate help file. That's it, that's the whole vibe.MOST_INITFILEβ set this to specify the initialization file to load during startup. The default action is to load the system configuration file and then a personal configuration file called.mostrcon Unix, andmost.rcon other systems. slay, two layers of customization, we love to see it π
π CONFIGURATION FILE SYNTAX π
When most starts up, it tries to read a system configuration file and then a personal configuration file. These files are where you get to specify key-bindings and colors, which is giving main character energy ngl.
To bind a key to a particular function use the syntax:
setkey function-name key-sequence
The setkey command requires two arguments, no more no less, periodt. 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. yes bestie, you just made Ctrl-P go up, iconic.
Sometimes, it is necessary to first unbind a key-sequence before rebinding it in order via the unsetkey function:
unsetkey "^F"
π«£ fr fr, sometimes you gotta break up with a binding before you can commit to a new one. it's giving healthy boundaries.
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 textoverstrikeβ overstruck textnormalβ anything else
See the sample configuration files for more information.
π BUGS π
okay, real talk time. Almost all of the known bugs or limitations of most are due to a desire to read and interpret control characters in files. Not me defending it, just explaining the lore.
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.
The regular-expression searches may fail to find strings that involve backspace/underscore used for highlighting. The regular-expression syntax is described in the S-Lang Library documentation.
β¨ AUTHOR β¨
John E. Davis <jed@jedsoft.org>
π ACKNOWLEDGEMENTS π
Over the years, many people have contributed to most in one way or another, e.g., via code patches, bug-fixes, comments, or criticisms. I am particularly grateful to the very early adopters of the program who took a chance with a fledgling software project headed by someone learning the underlying language. These include:
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 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 for re-writing the search routines to use regular expressions.
Sven Oliver Moll 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.
Javier Kohen was instrumental in the support for UTF-8.
Thanks to David W. Sanderson for adapting the early documentation to nroff man page source format.
and that's the whole page, bestie π this manual page is MOST(1), dated 30 July 2022, and it ATE. go forth and scroll with your whole chest π¦π
π
π¦ where this page comes from
- alpine 3.24: most-doc 5.2.0-r3 Β· GPL-2.0-or-later
- arch rolling: most 5.2.0-3 Β· GPL-2.0-or-later
- debian trixie: most 5.2.0-1.1
- epel 10: most 5.2.0-8.el10_1 Β· GPL-2.0-or-later
- fedora 43: most 5.2.0-9.fc43 Β· GPL-2.0-or-later
- fedora 44: most 5.2.0-10.fc44 Β· GPL-2.0-or-later
- nixpkgs unstable: most 5.2.0
- opensuse-leap 16.0: most 5.2.0-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: most 5.2.0-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: most 5.2.0-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: most 5.2.0-bp160.1.13 Β· GPL-2.0-or-later
- ubuntu noble: most 5.2.0-1
- ubuntu questing: most 5.2.0-1.1
- ubuntu resolute: most 5.2.0-1.1build1
- ubuntu stonking: most 5.2.0-1.1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms