File: most.doc

package info (click to toggle)
most 4.9.5-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 616 kB
  • ctags: 416
  • sloc: ansic: 5,448; sh: 4,903; makefile: 121
file content (528 lines) | stat: -rw-r--r-- 18,956 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528



MOST(1)                                                   MOST(1)


NNAAMMEE
       most - browse or page through a text file

SSYYNNOOPPSSIISS
       mmoosstt  [--bbssttvvwwzz]  [++_l_i_n_e_n_o]  [++cc]  [++dd]  [++//_s_t_r_i_n_g]  [_f_i_l_e_-
       _n_a_m_e...]

DDEESSCCRRIIPPTTIIOONN
       _m_o_s_t 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, _m_o_s_t is capable of  display-
       ing  an arbitrary number of windows as long as each window
       occupies at least two screen lines.  Each window may  con-
       tain the same file or a different file.  In addition, each
       window has its own mode.  For example, one window may dis-
       play  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.   _m_o_s_t  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 `::oo' command
       for a description of this feature.

       In addition to displaying ordinary text  files,  _m_o_s_t  can
       also  display binary files as well as files with arbitrary
       ascii characters.  When a file is read into a buffer, _m_o_s_t
       examines  the  first  32 bytes of the file to determine if
       the file is a binary file and then switches to the  appro-
       priate  mode.   However, this feature may be disabled with
       the --kk option.  See the description of the --bb, --kk, --vv, and
       --tt options for further details.

       Text  files  may  contain  combinations  of underscore and
       backspace characters causing a  printer  to  underline  or
       overstrike.   When  _m_o_s_t  recognizes  this, it inserts the
       appropriate  escape  sequences  to  achieve  the   desired
       effect.   In  addition,  some  files  cause the printer to
       overstrike some characters by  embedding  carriage  return
       characters  in  the  middle  of a line.  When this occurs,
       _m_o_s_t  displays  the  overstruck  character  with  a   bold
       attribute.   This  feature facilitates the reading of UNIX
       man pages or a document produced by _r_u_n_o_f_f.   In  particu-
       lar,  viewing  this  document  with _m_o_s_t should illustrate
       this behavior provided that the underline characters  have
       not  been  stripped.   This  may be turned off with the --vv
       option.

       By default, lines with more characters than  the  terminal
       width  are  not  wrapped  but are instead truncated.  When



                             May 1999                           1





MOST(1)                                                   MOST(1)


       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 --ww option may be used to over-
       ride this feature.  When a window is wrapped, the  charac-
       ter `\' will appear at the right edge of the window.

       Commands are listed below.

OOPPTTIIOONNSS
       --11     VT100  mode.   This  is meaningful only on VMS sys-
              tems.  This option should be used if  the  terminal
              is  strictly a VT100.  This implies that the termi-
              nal does not have the ability to delete and  insert
              multiple  lines.   VT102s and above have this abil-
              ity.

       --bb     Binary mode.  Use this switch when you want to view
              files  containing 8 bit characters.  _m_o_s_t will dis-
              play the file 16  bytes  per  line  in  hexidecimal
              notation.  A typical line looks like:

                   01000000 40001575 9C23A020 4000168D     ....@..u.#. @...

              When  used  with the --vv option, the same line looks
              like:

                   ^A^@^@^@  @^@^U u 9C #A0    @^@^V8D     ....@..u.#. @...

       --kk     `Kanji' option.   Ordinarily,  _m_o_s_t  will  go  into
              binary mode if the file consists of non-ascii char-
              acters.  Sometimes this feature  is  not  desirable
              since  some terminals have a special interpretation
              for eight bit characters.  The --kk option turns  off
              the automatic sensing.

       --ss     Squeeze.   Replace multiple blank lines with a sin-
              gle blank line.

       --zz     option turns off gunzip-on-the-fly.

       --vv     Display control characters as in `^A'  for  control
              A.   Normally _m_o_s_t does not interpret control char-
              acters.

       --tt     Display tabs as `^I'.  This  option  is  meaningful
              only  when  used with the --vv option.  ++_l_i_n_e_n_o Start
              up at _l_i_n_e_n_o.

       ++cc     Make search case sensitive.  By default,  they  are
              not.

       ++dd     This  switch  should  only  be used if you want the
              option to delete a file  while  viewing  it.   This



                             May 1999                           2





MOST(1)                                                   MOST(1)


              makes  it  easier  to clean unwanted files out of a
              directory.  The file is deleted with  the  interac-
              tive  key  sequence  `::DD'  and then confirming with
              `yy'.

       ++//_s_t_r_i_n_g
              Start up at the line containing  the  first  occur-
              rence of _s_t_r_i_n_g.

CCOOMMMMAANNDD UUSSAAGGEE
       The  commands take effect immediately; it is not necessary
       to type a carriage return.

       In the following commands, _i is a numerical argument (1 by
       default).

       SSPPAACCEE, CCTTRRLL--DD, NNEEXXTT__SSCCRREEEENN
              Display  another windowful, or jump _i windowfuls if
              _i is specified.

       RREETTUURRNN, DDOOWWNN__AARRRROOWW, VV, CCTTRRLL--NN
              Display another line, or _i more  lines,  if  speci-
              fied.

       UUPP__AARRRROOWW, ^^, CCTTRRLL--PP
              Display  previous  line,  or  _i  previous lines, if
              specified.

       TT, EESSCCAAPPEE<
              Move to top of buffer.

       BB, EESSCCAAPPEE>
              Move to bottom of buffer.

       RRIIGGHHTT__AARRRROOWW, TTAABB, >>
              Scroll window left 60_i columns to view  lines  that
              are beyond the right margin of the window.

       LLEEFFTT__AARRRROOWW, CCTTRRLL--BB, <<
              Scroll  window right 60_i columns to view lines that
              are beyond the left margin of the window.

       UU, CCTTRRLL--UU, DDEELLEETTEE, PPRREEVV__SSCCRREEEENN
              Skip back _i windowfuls and then print a  windowful.

       RR, CCTTRRLL--RR
              Redraw the window.

       JJ, GG   If  _i is not specified, then prompt for a line num-
              ber then jump to that line otherwise just  jump  to
              line _i.

       %%      If  _i  is  not specified, then prompt for a percent
              number then  jump  to  that  percent  of  the  file



                             May 1999                           3





MOST(1)                                                   MOST(1)


              otherwise just jump to _i percent of the file.

       WW, ww   If  the current screen width is 80, make it 132 and
              vice-versa.  For  other  values,  this  command  is
              ignored.

       QQ, CCTTRRLL--XX CCTTRRLL--CC, CCTTRRLL--KK EE
              Exit from _m_o_s_t.  On VMS, ^Z also exits.

       hh, CCTTRRLL--HH, HHEELLPP, PPFF22
              Help.  Give a description of all the _m_o_s_t commands.
              The _m_o_s_t environment variable MMOOSSTT__HHEELLPP must be set
              for this to be meaningful.

       ff, //, CCTTRRLL--FF, FFIINNDD, GGOOLLDD PPFF33
              Prompt  for  a  string  and search forward from the
              current line for _ith distinct line  containing  the
              string.  CCTTRRLL--GG aborts.

       ??      Prompt for a string and search backward for the _ith
              distinct  line  containing  the   string.    CCTTRRLL--GG
              aborts.

       nn      Search  for  the  next _i lines containing an occur-
              rence of the last search string in the direction of
              the previous search.

       mm, SSEELLEECCTT, CCTTRRLL--@@, CCTTRRLL--KK MM, PPEERRIIOODD
              Set a mark on the current line for later reference.

       IINNSSEERRTT__HHEERREE,, CCTTRRLL--XX CCTTRRLL--XX,, CCOOMMMMAA,, CCTTRRLL--KK RREETTUURRNN,, GGOOLLDD
              PPEERRIIOODD
              Set a mark on the current line but return to previ-
              ous mark.  This allows the user to toggle back  and
              forth between two positions in the file.

       ll, LL   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.

       CCTTRRLL--XX 22, CCTTRRLL--WW 22, GGOOLLDD XX
              Split this window in half.

       CCTTRRLL--XX oo, CCTTRRLL--WW oo, oo, GGOOLLDDUP,, GOLDDDOOWWNN
              Move to other window.

       CCTTRRLL--XX 00, CCTTRRLL--WW 00, GGOOLLDD VV
              Delete this window.

       CCTTRRLL--XX 11, CCTTRRLL--WW 11, GGOOLLDD OO
              Delete all other windows, leaving only one  window.

       EE, ee   Edit this file.



                             May 1999                           4





MOST(1)                                                   MOST(1)


       $$, EESSCC $$
              This is system dependent.  On VMS, this causes _m_o_s_t
              to spawn a subprocess.  When  the  user  exits  the
              process,  _m_o_s_t  is  resumed.  On UNIX systems, _m_o_s_t
              simply suspends itself.

       ::nn     Skip to the next  filename  given  in  the  command
              line.   Use  the  arrow  keys  to scroll forward or
              backward through the file list.  `QQ' quits _m_o_s_t and
              any other key selects the given file.

       ::cc     Toggle case sensitive search.

       ::DD     Delete current file.  This command is only meaning-
              ful with the ++dd switch.

       ::oo, ::OO Toggle various options.  With  this  key  sequence,
              _m_o_s_t  displays  a prompt asking the user to hit one
              of: bbddttvvww.  The `bb', `tt', `vv', and `ww' options have
              the same meaning as the command line switches.  For
              example, the `ww' option will toggle wrapping on and
              off for the current window.

              The  `dd'  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 `11::oodd' will cause _m_o_s_t to display
              the file ignoring all  lines  indented  beyond  the
              first column.  So for the example above, _m_o_s_t would
              display:

                   int main(int argc, char **argv)...
                   }

              where the `...' indicates lines follow are not dis-
              played.

HHIINNTTSS
       CCTTRRLL--GG  aborts  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 occurrence of a  string



                             May 1999                           5





MOST(1)                                                   MOST(1)


       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 ``^^JJTThhee where `` quotes
       the CCTTRRLL--JJ.

EENNVVIIRROONNMMEENNTT
       _m_o_s_t uses the following environment variables:

       MMOOSSTT__SSWWIITTCCHHEESS
              This variable sets  commonly  used  switches.   For
              example, some people prefer to use _m_o_s_t with the --ss
              option so that excess  blank  lines  are  not  dis-
              played.   On  VMS this is normally done done in the
              login.com through the line:

                   $ define MOST_SWITCHES "-s"

       MMOOSSTT__EEDDIITTOORR, SSLLAANNGG__EEDDIITTOORR
              Either of these environment  variables  specify  an
              editor for _m_o_s_t to invoke to edit a file. The value
              can contain %s and %d formatting  descriptors  that
              represent  the  file  name and line number, respec-
              tively.  For example, if JED is your  editor,  then
              set MMOOSSTT__EEDDIITTOORR to 'jed %s -g %d'.

       MMOOSSTT__HHEELLPP
              This  variable  may be used to specify an alternate
              help file.

       MMOOSSTT__IINNIITTFFIILLEE
              Set this variable  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 _._m_o_s_t_r_c on Unix,
              and _m_o_s_t_._r_c on other systems.

CCOONNFFIIGGUURRAATTIIOONN FFIILLEE SSYYNNTTAAXX
       When most starts up, it tries to read a  system  confiura-
       tion  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:

       sseettkkeeyy ffuunnccttiioonn--nnaammee kkeeyy--sseeqquueennccee

       The _s_e_t_k_e_y command requires two arguments.  The  _f_u_n_c_t_i_o_n_-
       _n_a_m_e  argument  specifies  the function that is to be exe-
       cuted as a response to the  keys  specified  by  the  _k_e_y_-
       _s_e_q_u_e_n_c_e argument are pressed.  For example,

             setkey   "up"     "^P"

       indicates that when _C_t_r_l_-_P is pressed then the function _u_p
       is to be executed.



                             May 1999                           6





MOST(1)                                                   MOST(1)


       Sometimes, it is necessary to first unbind a  key-sequence
       before rebinding it in order via the _u_n_s_e_t_k_e_y function:

              unsetkey "^F"

       Colors may be defined through the use of the _c_o_l_o_r keyword
       in the the configuration file using the syntax:

       ccoolloorr OOBBJJEECCTT--NNAAMMEE FFOORREEGGRROOUUNNDD--CCOOLLOORR BBAACCKKGGRROOUUNNDD--CCOOLLOORR

       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.

BBUUGGSS
       Almost all of the known bugs or limitations  of  _m_o_s_t  are
       due  to  a desire to read and interpret control characters
       in files.  One problem concerns the use of backspace char-
       acters to underscore or overstrike other characters.  _m_o_s_t
       makes an attempt to use terminal escape sequences to simu-
       late  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 --vv and --bb options
       of _m_o_s_t.


AAUUTTHHOORR
       John E. Davis
       davis@space.mit.edu

AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS
       I would like to thank the users of _m_o_s_t for valuable  com-
       ments  and  criticisms.   I would especially like to thank
       those individuals who have contributed code to _m_o_s_t_.

       Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark
       Pizzolato  contributed  to the early VMS versions of _m_o_s_t_.
       In particular, Mark worked on  it  to  get  it  ready  for
       DECUS.

       Foteos  Macrides  <MACRIDES@SCI.WFEB.EDU> adapted _m_o_s_t for
       use in _c_s_w_i_n_g and _g_o_p_h_e_r_.  A few features of  the  present
       version of _m_o_s_t was inspired from his work.

       I  am grateful to Robert Mills <robert@jna.com.au> for re-
       writing the search routines to use regular expressions.

       Sven Oliver Moll <smol0075@rz.uni-hildesheim.de>  came  up
       with the idea of automatic detection of zipped files.



                             May 1999                           7





MOST(1)                                                   MOST(1)


       I  would also like to thank Shinichi Hama for his valuable
       criticisms of _m_o_s_t_.

       Thanks to David W. Sanderson (dws@cs.wisc.edu) for  adapt-
       ing the documentation to nroff man page source format.




















































                             May 1999                           8