1MOST(1)                     General Commands Manual                    MOST(1)
2
3
4

NAME

6       most - browse or page through a text file
7

SYNOPSIS

9       most  [-1bCcdMstuvwz]  [+lineno]  [+c] [+d] [+s] [+u] [+/string] [file‐
10       name...]
11

DESCRIPTION

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

OPTIONS

61       -1     VT100  mode.   This  is  meaningful  only  on VMS systems.  This
62              option should be used if the terminal is strictly a VT100.  This
63              implies  that  the  terminal does not have the ability to delete
64              and insert multiple lines.  VT102s and above have this ability.
65
66       -b     Binary mode.  Use this switch when you want to view  files  con‐
67              taining  8  bit characters.  most will display the file 16 bytes
68              per line in hexadecimal notation.  A typical line looks like:
69
70                   01000000 40001575 9C23A020 4000168D     ....@..u.#. @...
71
72              When used with the -v option, the same line looks like:
73
74                   ^A^@^@^@  @^@^U u 9C #A0    @^@^V8D     ....@..u.#. @...
75
76       -C     Disable color support.
77
78       -d     Omit the backslash mark used to denote a wrapped line.
79
80       -M     Disable the use of mmap.
81
82       -s     Squeeze.  Replace multiple blank lines with a single blank line.
83
84       -z     option turns off gunzip-on-the-fly.
85
86       -v     Display control characters as in `^A' for control  A.   Normally
87              most does not interpret control characters.
88
89       -t     Display  tabs as `^I'.  This option is meaningful only when used
90              with the -v option.
91
92       +lineno
93              Start up at lineno.
94
95       -c     Make searches case sensitive.  By default, they are not.
96
97       -u     Disable UTF-8 mode even if the locale dictates it.
98
99       +u     Force UTF-8 mode.  By default most will use the  current  locale
100              to  determine  if  UTF-8  mode  shoul  be  used.   The +u and -u
101              switches allow the behavior to be overridden.
102
103       +d     This switch should only be used if you want the option to delete
104              a file while viewing it.  This makes it easier to clean unwanted
105              files out of a directory.  The file is deleted with the interac‐
106              tive key sequence `:D' and then confirming with `y'.
107
108       +/string
109              Start up at the line containing the first occurrence of string.
110

COMMAND USAGE

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

HINTS

246       CTRL-G aborts the commands requiring the user to type something in at a
247       prompt.  The backquote key has a special meaning here.  It is  used  to
248       quote  certain  characters.   This is useful when search for the occur‐
249       rence of a string with a control character or a string at the beginning
250       of  a line.  In the latter case, to find the occurrence of `The' at the
251       beginning of a line, enter `^JThe where ` quotes the CTRL-J.
252

ENVIRONMENT

254       most uses the following environment variables:
255
256       MOST_SWITCHES
257              This variable sets commonly used switches.   For  example,  some
258              people  prefer  to  use  most  with the -s option so that excess
259              blank lines are not displayed.  On VMS  this  is  normally  done
260              done in the login.com through the line:
261
262                   $ define MOST_SWITCHES "-s"
263
264       MOST_EDITOR, SLANG_EDITOR
265              Either of these environment variables specify an editor for most
266              to invoke to edit a file. The value can contain %s and  %d  for‐
267              matting  descriptors  that represent the file name and line num‐
268              ber, respectively.  For example, if JED is your editor, then set
269              MOST_EDITOR to 'jed %s -g %d'.
270
271       MOST_HELP
272              This variable may be used to specify an alternate help file.
273
274       MOST_INITFILE
275              Set  this  variable  to  specify the initialization file to load
276              during startup.  The default action is to load the  system  con‐
277              figuration  file  and  then a personal configuration file called
278              .mostrc on Unix, and most.rc on other systems.
279

CONFIGURATION FILE SYNTAX

281       When most starts up, it tries to read a system configuration  file  and
282       then a personal configuration file.  These files may be used to specify
283       keybindings and colors.
284
285       To bind a key to a particular function use the syntax:
286
287       setkey function-name key-sequence
288
289       The setkey command requires two arguments.  The function-name  argument
290       specifies the function that is to be executed as a response to the keys
291       specified by the key-sequence argument are pressed.  For example,
292
293             setkey   "up"     "^P"
294
295       indicates that when Ctrl-P is pressed then the function  up  is  to  be
296       executed.
297
298       Sometimes,  it  is  necessary  to  first  unbind  a key-sequence before
299       rebinding it in order via the unsetkey function:
300
301              unsetkey "^F"
302
303       Colors may be defined through the use of the color keyword in  the  the
304       configuration file using the syntax:
305
306       color OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR
307
308       Here, OBJECT-NAME can be any one of the following items:
309
310           status           -- the status line
311           underline        -- underlined text
312           overstrike       -- overstriked text
313           normal           -- anything else
314
315       See the sample configuration files for more information.
316

BUGS

318       Almost all of the known bugs or limitations of most are due to a desire
319       to read and interpret control characters in files.   One  problem  con‐
320       cerns the use of backspace characters to underscore or overstrike other
321       characters.  most makes an attempt to use terminal escape sequences  to
322       simulate this behavior.  One side effect is the one does not always get
323       what one expects when scrolling right and left through a file.  When in
324       doubt, use the -v and -b options of most.
325

AUTHOR

327       John E. Davis
328       davis@space.mit.edu
329

ACKNOWLEDGEMENTS

331       I would like to thank the users of most for valuable comments and crit‐
332       icisms.  I would especially like to thank those  individuals  who  have
333       contributed code to most.
334
335       Mats  Akerberg,  Henk  D. Davids, Rex O. Livingston, and Mark Pizzolato
336       contributed to the early VMS versions of  most.   In  particular,  Mark
337       worked on it to get it ready for DECUS.
338
339       Foteos  Macrides <MACRIDES@SCI.WFEB.EDU> adapted most for use in cswing
340       and gopher.  A few features of the present version of most was inspired
341       from his work.
342
343       I  am  grateful  to Robert Mills <robert@jna.com.au> for re-writing the
344       search routines to use regular expressions.
345
346       Sven Oliver Moll <smol0075@rz.uni-hildesheim.de> came up with the  idea
347       of automatic detection of zipped files.
348
349       I would also like to thank Shinichi Hama for his valuable criticisms of
350       most.
351
352       Javier Kohen was instrumental in the support for UTF-8.
353
354       Thanks to David W. Sanderson (dws@cs.wisc.edu) for adapting  the  docu‐
355       mentation to nroff man page source format.
356
357
358
359
360                                   May 1999                            MOST(1)
Impressum