most

浏览或翻阅文本文件.

语法

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

选项




   -1  VT100模式。这仅对VMS系统有意义。
       如果终端严格是VT100,则应使用此选项。
       这意味着终端无法删除和
       插入多行。VT102及以上版本具备此功能。

   -b  二进制模式

   -k  'Kanji' 选项。通常,如果文件,大多数将进入二进制模式
       由非ascii字符组成。有时这个功能不是
       因为一些终端有特殊的解释
       八位字符。-k选项关闭自动感应

   -C  禁用颜色支持

   -M  禁用mmap

   -s  挤压。用一个空行替换多个空行

   -z  选项关闭gunzip-on-the-fly.

   -v  在控件A的'^A'中显示控制字符。
       通常大多数都不解释控制字符。

   -t 将标签显示为“^I”,这个选项只有与-v选项一起使用时才有意义

   +c  使搜索区分大小写,默认情况下,它们不是

   +d  如果您希望在查看文件时删除文件,则只应使用此开关。这样可以更轻松地
       从目录中清除不需要的文件。使用交互
       键序列':D' 删除文件,然后用'y'确认

   +/string
       从包含第一次出现的字符串的行开始

大多数是一个分页程序,它一次只显示一个窗口,显示终端上文件的内容。它会在每个窗口后暂停,并在窗口状态行上打印文件名,当前行号和到目前为止显示的文件百分比。与其他寻呼程序不同,只要每个窗口占据至少两个屏幕行,大多数都能够显示任意数量的窗口。每个窗口可以包含相同的文件或不同的文件。此外,每个窗口都有自己的模式。

例如,一个窗口可以显示包含其线条的文件,而另一个窗口可以截断这些线条。窗口可以“锁定”在一起,因为如果其中一个锁定的窗口滚动,则所有锁定的窗口都将滚动。大多数也能够忽略缩进超出用户指定值的行。在查看计算机程序以选择代码的主要功能时,这非常有用。有关此功能的说明,请参阅’:o’命令。

除了显示普通文本文件外,大多数文件还可以显示二进制文件以及具有任意ascii字符的文件。当文件被读入缓冲区时,大多数检查文件的前32个字节以确定文件是否是二进制文件然后切换到适当的模式。但是,可以使用-k选项禁用此功能。有关更多详细信息,请参阅-b,-k,-v和-t选项的说明。

文本文件可以包含下划线和退格字符的组合,从而导致打印机加下划线或重击。当大多数人意识到这一点时,它会插入适当的转义序列以达到预期的效果。此外,某些文件会导致打印机通过在行中间嵌入回车符来重写某些字符。发生这种情况时,大多数都会显示带有粗体属性的重叠字符。此功能有助于读取UNIX手册页或由径流生成的文档。特别是,大多数人查看此文档应该说明此行为,前提是下划线字符尚未被删除。可以使用-v选项关闭此功能。

默认情况下,字符数多于终端宽度的行不会被包装,而是被截断。当发生截断时,终端屏幕的最右列中的’$‘表示。右箭头键和左箭头键可用于查看延伸超出屏幕边缘的线条。-w选项可用于覆盖此功能。包裹窗口时,字符’'将出现在窗口的右边缘。

CTRL-G中止要求用户在提示符下输入内容的命令。反引号键在这里有特殊含义。它用于引用某些字符。当在行的开头搜索带有控制字符或字符串的字符串的出现时,这非常有用。在后一种情况下,要在行的开头找到’’‘的出现,请输入’^ JThe where’引用CTRL-J。

Examples

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

SPACE, CTRL-D, NEXT_SCREEN Display another windowful, or jump i windowfuls if i is specified.

RETURN, DOWN_ARROW, V, CTRL-N Display another line, or i more lines, if specified.

UP_ARROW, ^, CTRL-P Display previous line, or i previous lines, if specified.

T, ESCAPE< Move to top of buffer.

B, ESCAPE> Move to bottom of buffer.

RIGHT_ARROW, TAB, > Scroll window left 60i columns to view lines that are beyond the right margin of the window.

LEFT_ARROW, CTRL-B, < Scroll window right 60i columns to view lines that are beyond the left margin of the window.

U, CTRL-U, DELETE, PREV_SCREEN Skip back i windowfuls and then print a windowful.

R, CTRL-R Redraw the window.

J, G If i is not specified, then prompt for a line number 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 otherwise just jump to i percent of the file.

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

Q, CTRL-X CTRL-C, CTRL-K E Exit from most. On VMS, ^Z also exits.

h, CTRL-H, HELP, PF2 Help. Give a description of all the most commands. The most environment variable MOST_HELP must 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 ith distinct line containing the string. CTRL-G aborts.

? Prompt for a string and search backward for the ith distinct line containing the string. CTRL-G aborts.

n Search for the next i lines 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 previous mark. This allows the user to toggle back and forth between two positions in the file.

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 most to spawn a subprocess. When the user exits the process, most is resumed. On UNIX systems, most simply 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.

‘Q’ quits most and any other key selects the given file.

:c Toggle case sensitive search.

😄 Delete current file. This command is only meaningful with the +d switch.

😮, 😮 Toggle various options. With this key sequence, most displays a prompt asking the user to hit one of: bdtvw. The ‘b’, ‘t’, ‘v’, and ‘w’ options have the same meaning as the command line switches. For example, the ‘w’ option 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.

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 follow are not displayed.

most 命令实例:

linux命令:mosth() { history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10; } } -n10; head | nl | -nr sort | -t " " -s -c3 column | "./" -v grep | a;}' " "% CMD[a]/count*100 " " CMD[a] CMD)print in (a for { '{CMD[$2]++;count++;}END awk | history { mosth() mosth() { history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10; }rootopen.com
linux命令:mosth() { history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10; } } -n10; head | nl | -nr sort | -t " " -s -c3 column | "./" -v grep | a;}' " "% CMD[a]/count*100 " " CMD[a] CMD)print in (a for { '{CMD[$2]++;count++;}END awk | history { mosth() mosth() { history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10; }rootopen.com
2018-03-12 01:16:48

Linux的Bash命令行(A-Z排序)