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

NAME

6       most - browse or page through a text file
7

SYNOPSIS

9       most [-1bCckMstvwz] [+lineno] [+c] [+d] [+s] [+/string] [filename...]
10

DESCRIPTION

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

OPTIONS

60       -1     VT100 mode.  This is  meaningful  only  on  VMS  systems.   This
61              option should be used if the terminal is strictly a VT100.  This
62              implies that the terminal does not have the  ability  to  delete
63              and insert multiple lines.  VT102s and above have this ability.
64
65       -b     Binary  mode.   Use this switch when you want to view files con‐
66              taining 8 bit characters.  most will display the file  16  bytes
67              per line in hexidecimal notation.  A typical line looks like:
68
69                   01000000 40001575 9C23A020 4000168D     ....@..u.#. @...
70
71              When used with the -v option, the same line looks like:
72
73                   ^A^@^@^@  @^@^U u 9C #A0    @^@^V8D     ....@..u.#. @...
74
75       -k     `Kanji'  option.   Ordinarily,  most will go into binary mode if
76              the file consists of non-ascii characters.  Sometimes this  fea‐
77              ture is not desirable since some terminals have a special inter‐
78              pretation for eight bit characters.  The -k option turns off the
79              automatic sensing.
80
81       -C     Disable color support.
82
83       -M     Disable the use of mmap.
84
85       -s     Squeeze.  Replace multiple blank lines with a single blank line.
86
87       -z     option turns off gunzip-on-the-fly.
88
89       -v     Display  control  characters as in `^A' for control A.  Normally
90              most does not interpret control characters.
91
92       -t     Display tabs as `^I'.  This option is meaningful only when  used
93              with the -v option.  +lineno Start up at lineno.
94
95       +c     Make search case sensitive.  By default, they are not.
96
97       +d     This switch should only be used if you want the option to delete
98              a file while viewing it.  This makes it easier to clean unwanted
99              files out of a directory.  The file is deleted with the interac‐
100              tive key sequence `:D' and then confirming with `y'.
101
102       +/string
103              Start up at the line containing the first occurrence of string.
104

COMMAND USAGE

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

HINTS

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

ENVIRONMENT

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

CONFIGURATION FILE SYNTAX

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

BUGS

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

AUTHOR

321       John E. Davis
322       davis@space.mit.edu
323

ACKNOWLEDGEMENTS

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