1MOST(1)                                                                MOST(1)
2
3
4

NAME

6       most - browse or page through a text file
7

SYNOPSIS

9       most  [  -1 ] [ -b ] [ -C ] [ -c ] [ -d ] [ -M ] [ -r ] [ -s ] [ -t ] [
10       -u ] [ -v ] [ -w ] [ -z ] [ +/string ] [ +line-number ] [ +d ] [ +s ] [
11       +u ] [ file... ]
12
13

DESCRIPTION

15       most  is  a  paging program that displays, one windowful at a time, the
16       contents of a file on a terminal.  It pauses after each  windowful  and
17       prints on the window status line the screen the file name, current line
18       number, and the percentage of the file so far displayed.
19
20       Unlike other paging programs, most is capable of  displaying  an  arbi‐
21       trary  number  of  windows as long as each window occupies at least two
22       screen lines.  Each window may contain the same  file  or  a  different
23       file.   In  addition,  each  window has its own mode.  For example, one
24       window may display a file with its lines wrapped while another  may  be
25       truncating  the  lines.  Windows  may be `locked' together in the sense
26       that if one of the locked windows  scrolls,  all  locked  windows  will
27       scroll.   most  is also capable of ignoring lines that are indented be‐
28       yond a user specified value.  This is useful when viewing computer pro‐
29       grams to pick out gross features of the code.  See the `:o' command for
30       a description of this feature.
31
32       In addition to displaying ordinary text files, most  can  also  display
33       binary  files as well as files with arbitrary ascii characters.  When a
34       file is read into a buffer, most examines the first  32  bytes  of  the
35       file to determine if the file is a binary file and then switches to the
36       appropriate mode.  However, this feature may be disabled  with  the  -k
37       option.  See the description of the -b, -k, -v, and -t options for fur‐
38       ther details.
39
40       Text files may contain combinations of underscore and backspace charac‐
41       ters  causing  a  printer to underline or overstrike.  When most recog‐
42       nizes this, it inserts the appropriate escape sequences to achieve  the
43       desired  effect.   In  addition,  some files cause the printer to over‐
44       strike some characters by embedding carriage return characters  in  the
45       middle of a line.  When this occurs, most displays the overstruck char‐
46       acter with a bold attribute.  This feature facilitates the  reading  of
47       UNIX  man pages or a document produced by runoff.  In particular, view‐
48       ing this document with most should illustrate  this  behavior  provided
49       that  the  underline  characters  have  not been stripped.  This may be
50       turned off with the -v option.
51
52       By default, lines with more characters than the terminal width are  not
53       wrapped  but are instead truncated. When truncation occurs, this is in‐
54       dicated by a `$' in the far right column of the terminal  screen.   The
55       RIGHT  and  LEFT arrow keys may be used to view lines which extend past
56       the margins of the screen.  The -w option may be used to override  this
57       feature.   When  a  window is wrapped, the character `\' will appear at
58       the right edge of the window.
59
60       Commands are listed below.
61

COLOR SUPPORT

63       most has supported both 256-color and 24 bit truecolor terminals  since
64       version  5.2.  Not all terminals are capable of generating arbitrary 24
65       bit colors. If your terminal supports 24 bit colors, but most does  not
66       detect it, then set the environment variable
67
68            COLORTERM=truecolor
69
70       to force 24 bit truecolors to be used.
71

OPTIONS

73       -1     VT100  mode.   This is meaningful only on VMS systems.  This op‐
74              tion should be used if the terminal is strictly a  VT100.   This
75              implies  that  the  terminal does not have the ability to delete
76              and insert multiple lines.  VT102s and above have this ability.
77
78       -b     Binary mode.  Use this switch when you want to view  files  con‐
79              taining  8  bit characters.  most will display the file 16 bytes
80              per line in hexadecimal notation. A typical line looks like:
81
82                 01000000 40001575 9C23A020 4000168D     ....@..u.#. @...
83
84              When used with the -v option, the same line looks like:
85
86                 ^A^@^@^@  @^@^U u 9C #A0    @^@^V8D     ....@..u.#. @...
87
88       -C     Disable color support.
89
90       -c     Make searches case-sensitive
91
92       -d     Omit the backslash mark used to denote a wrapped line.
93
94       -M     Disable the use of mmap.
95
96       -r     Default to using regexp searches
97
98       -s     Squeeze-mode.  Replace multiple blank lines with a single  blank
99              line.
100
101       -t     Display  tabs  as ^I.  If this option is immediately followed by
102              an integer, the integer sets the tab width, e.g., -t4
103
104       -u     Disable UTF-8 mode even if the locale dictates it
105
106       +u     Force UTF-8 mode.  By default most will use the  current  locale
107              to  determine  if  UTF-8  mode  should  be  used.  The +u and -u
108              switches allow the behavior to be overridden
109
110       -v     Display control characters as in `^A' for control  A.   Normally
111              most does not interpret control characters.
112
113       -w     Wrap lines
114
115       -z     Disable gunzip-on-the-fly
116
117       +/string
118              Start up at the line containing the first occurrence of string
119
120       +lineno
121              Start up at the specified line-number
122
123       +d     This switch should only be used if you want the option to delete
124              a file while viewing it.  This makes it easier to clean unwanted
125              files  out of a directory. The file is deleted with the interac‐
126              tive key sequence `:D' and then confirming with `y'.
127
128       +s     Secure Mode-- no edit, cd, shell, and reading files not  already
129              listed on the command line.
130

COMMAND USAGE

132       The  commands  take  effect  immediately; it is not necessary to type a
133       carriage return.  In the following commands, i is a numerical  argument
134       (1 by default).
135
136       SPACE, CTRL-D, NEXT_SCREEN
137              Display  another  windowful, or jump i windowfuls if i is speci‐
138              fied.
139
140       RETURN, DOWN_ARROW, V, CTRL-N
141              Display another line, or i more lines, if specified.
142
143       UP_ARROW, ^, CTRL-P
144              Display previous line, or i previous lines, if specified.
145
146       T, ESCAPE<
147              Move to top of buffer.
148
149       B, ESCAPE>
150              Move to bottom of buffer.
151
152       RIGHT_ARROW, TAB, >
153              Scroll window left 60i columns to view lines that are beyond the
154              right margin of the window.
155
156       LEFT_ARROW, CTRL-B, <
157              Scroll  window  right  60i columns to view lines that are beyond
158              the left margin of the window.
159
160       U, CTRL-U, DELETE, PREV_SCREEN
161              Skip back i windowfuls and then print a windowful.
162
163       R, CTRL-R
164              Redraw the window.
165
166       J, G   If  i  is  not  specified, then prompt for a  line  number  then
167              jump to that line otherwise just jump to line i.
168
169       %      If  i  is  not  specified, then prompt for a percent number then
170              jump to that percent of the file otherwise just jump to  i  per‐
171              cent of the file.
172
173       W, w   If   the   current   screen  width  is 80, make it 132 and vice-
174              versa.  For other values, this command is ignored.
175
176       Q, CTRL-X CTRL-C, CTRL-K E
177              Exit from most.  On VMS, ^Z also exits.
178
179       h, CTRL-H, HELP, PF2
180              Help.  Give a description of all the most  commands.   The  most
181              environment  variable MOST_HELP must be set for this to be mean‐
182              ingful.
183
184       f, /, CTRL-F, FIND, GOLD PF3
185              Prompt  for  a  string  and search forward from the current line
186              for ith distinct line containing the string.  CTRL-G aborts.
187
188       ?      Prompt  for  a  string  and search backward for the ith distinct
189              line containing the string.  CTRL-G aborts.
190
191       n      Search for the next i lines containing an occurrence of the last
192              search string in the direction of the previous search.
193
194       m, SELECT, CTRL-@, CTRL-K M, PERIOD
195              Set a mark on the current line for later reference.
196
197       INSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD
198              Set  a  mark  on  the  current line but return to previous mark.
199              This allows the user to toggle back and forth between two  posi‐
200              tions in the file.
201
202       l, L   Toggle  locking  for this window.  The window is locked if there
203              is a `*' at the left edge of the status  line.   Windows  locked
204              together, scroll together.
205
206       CTRL-X 2, CTRL-W 2, GOLD X
207              Split this window in half.
208
209       CTRL-X o, CTRL-W o, o, GOLDUP, GOLDDOWN
210              Move to other window.
211
212       CTRL-X 0, CTRL-W 0, GOLD V
213              Delete this window.
214
215       CTRL-X 1, CTRL-W 1, GOLD O
216              Delete all other windows, leaving only one window.
217
218       E, e   Edit this file.
219
220       $, ESC $
221              This  is  system dependent.  On VMS, this causes most to spawn a
222              subprocess.  When the user exits the process, most  is  resumed.
223              On UNIX systems, most simply suspends itself.
224
225       :n     Skip  to  the  next filename given in the command line.  Use the
226              arrow keys to scroll forward or backward through the file  list.
227              `Q' quits most and any other key selects the given file.
228
229       :c     Toggle case sensitive search.
230
231       :D     Delete  current  file.  This command is only meaningful with the
232              +d switch.
233
234       :o, :O Toggle various options.  With this key sequence, most displays a
235              prompt asking the user to hit one of: bdtvw.  The `b', `t', `v',
236              and `w' options have  the  same  meaning  as  the  command  line
237              switches.   For  example, the `w' option will toggle wrapping on
238              and off for the current window.
239
240              The `d' option must be used with a prefix integer i.  All  lines
241              indented  beyond  i columns will not be displayed.  For example,
242              consider the fragment:
243
244
245
246                 int main(int argc, char **argv)
247                 {
248                   int i;
249                   for (i = 0; i < argc, i++)
250                     {
251                       fprintf(stdout,"%i: %s\n",i,argv[i]);
252                     }
253                   return 0;
254                 }
255              The key sequence `1:od' will cause most to display the file  ig‐
256              noring  all  lines indented beyond the first column.  So for the
257              example above, most would display:
258
259                 int main(int argc, char **argv)...
260                 }
261              where the `...' indicates lines that follow are not displayed.
262

HINTS

264       CTRL-G aborts the commands requiring the user to type something in at a
265       prompt.   The back-quote key has a special meaning here.  It is used to
266       quote certain characters.  This is useful when search  for  the  occur‐
267       rence of a string with a control character or a string at the beginning
268       of a line.  In the latter case, to find the occurrence of `The' at  the
269       beginning of a line, enter `^JThe where ` quotes the CTRL-J.
270

ENVIRONMENT

272       most uses the following environment variables:
273
274       MOST_SWITCHES
275              This  variable  sets  commonly used switches.  For example, some
276              people prefer to use most with the  -s  option  so  that  excess
277              blank  lines  are  not  displayed.  On VMS this is normally done
278              done in the login.com through the line:
279
280
281
282                 $ define MOST_SWITCHES "-s"
283
284       MOST_EDITOR, SLANG_EDITOR
285              Either  of  these environment variables specify  an  editor  for
286              most  to  invoke to edit a file. The value can contain %s and %d
287              formatting descriptors that represent the  file  name  and  line
288              number,  respectively.  For example, if JED is your editor, then
289              set MOST_EDITOR to 'jed %s -g %d'.
290
291       MOST_HELP
292              This variable may be used to specify an alternate help file.
293
294       MOST_INITFILE
295              Set this variable to specify the  initialization  file  to  load
296              during  startup.   The default action is to load the system con‐
297              figuration file and then a personal  configuration  file  called
298              .mostrc on Unix, and most.rc on other systems.
299

CONFIGURATION FILE SYNTAX

301       When  most  starts up, it tries to read a system configuration file and
302       then a personal configuration file. These files may be used to  specify
303       key-bindings and colors.
304
305       To bind a key to a particular function use the syntax:
306
307           setkey function-name key-sequence
308
309       The  setkey command requires two arguments.  The function-name argument
310       specifies the function that is to be executed as a response to the keys
311       specified by the key-sequence argument are pressed.  For example,
312
313           setkey   "up"     "^P"
314
315       indicates that when Ctrl-P is pressed then the function up is to be ex‐
316       ecuted.
317
318       Sometimes, it is necessary to first unbind a  key-sequence  before  re‐
319       binding it in order via the unsetkey function:
320
321           unsetkey "^F"
322
323       Colors  may  be defined through the use of the color keyword in the the
324       configuration file using the syntax:
325
326           color OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR
327
328       Here, OBJECT-NAME can be any one of the following items:
329
330            status           -- the status line
331            underline        -- underlined text
332            overstrike       -- overstruck text
333            normal           -- anything else
334
335       See the sample configuration files for more information.
336

BUGS

338       Almost all of the known bugs or limitations of most are due to a desire
339       to  read  and  interpret control characters in files.  One problem con‐
340       cerns the use of backspace characters to underscore or overstrike other
341       characters.   most makes an attempt to use terminal escape sequences to
342       simulate this behavior.  One side effect is the one does not always get
343       what one expects when scrolling right and left through a file.  When in
344       doubt, use the -v and -b options of most.
345
346       The regular-expression searches may fail to find strings  that  involve
347       backspace/underscore  used  for  highlighting.   The regular-expression
348       syntax is described in the S-Lang Library documentation.
349

AUTHOR

351       John E. Davis <jed@jedsoft.org>
352

ACKNOWLEDGEMENTS

354       Over the years, many people have contributed to most in one way or  an‐
355       other,  e.g.,  via code patches, bug-fixes, comments, or criticisms.  I
356       am particularly grateful to the very early adopters of the program  who
357       took  a  chance  with  a  fledgling  software project headed by someone
358       learning the underlying language.  These include:
359
360       Mats Akerberg, Henk D. Davids, Rex O. Livingston,  and  Mark  Pizzolato
361       contributed  to  the  early  VMS versions of most.  In particular, Mark
362       worked on it to get it ready for DECUS.
363
364       Foteos Macrides adapted most for use in cswing and gopher.  A few  fea‐
365       tures of the present version of most was inspired from his work.
366
367       I am grateful to Robert Mills for re-writing the search routines to use
368       regular expressions.
369
370       Sven Oliver Moll came up with the idea of automatic detection of zipped
371       files.
372
373       I would also like to thank Shinichi Hama for his valuable criticisms of
374       most.
375
376       Javier Kohen was instrumental in the support for UTF-8.
377
378       Thanks to David W. Sanderson for adapting the  early  documentation  to
379       nroff man page source format.
380
381
382
383                                 30 July 2022                          MOST(1)
Impressum