`
mixer_a
  • 浏览: 343513 次
社区版块
存档分类
最新评论

更高效的使用Linux下的more命令

阅读更多

更高效的使用more



Most commands optionally preceded by integer argument k.  Defaults in brackets.
Star (*) indicates argument becomes new default.
-------------------------------------------------------------------------------
<space>                 Display next k lines of text [current screen size]
z                       Display next k lines of text [current screen size]*
<return>                Display next k lines of text [1]*
d or ctrl-D             Scroll k lines [current scroll size, initially 11]*
q or Q or <interrupt>   Exit from more
s                       Skip forward k lines of text [1]
f                       Skip forward k screenfuls of text [1]
b or ctrl-B             Skip backwards k screenfuls of text [1]
'                       Go to place where previous search started
=                       Display current line number
/<regular expression>   Search for kth occurrence of regular expression [1]
n                       Search for kth occurrence of last r.e [1]
!<cmd> or :!<cmd>       Execute <cmd> in a subshell
v                       Start up /usr/bin/vi at current line
ctrl-L                  Redraw screen
:n                      Go to kth next file [1]
:p                      Go to kth previous file [1]
:f                      Display current file name and line number
.                       Repeat previous command
-------------------------------------------------------------------------------


翻译:


Most commands optionally preceded by integer argument k.  Defaults in brackets.
Star (*) indicates argument becomes new default.
大多数命令可以有选择的使用前导的整数参数k。[默认值],k的默认值在[]中。
星号(*)表明参数成为的新的默认值。


-------------------------------------------------------------------------------
<space>                 Display next k lines of text [current screen size]
 <空格键> 显示(当前行)后面的k行文本,[参数默认值:当前屏幕的尺寸大小]


z                       Display next k lines of text [current screen size]*
z                      显示(当前行)后面的k行文本,[参数默认值:当前屏幕的尺寸大小]* 


<return>                Display next k lines of text [1]*
<回车键> 显示(当前行)下面的k行文本;[默认值为1]


d or ctrl-D             Scroll k lines [current scroll size, initially 11]*
d或者ctrl+D             (从当前行)回滚k行文本,[当前的回滚大小, 初始值为11]


q or Q or <interrupt>   Exit from more
q 或者 Q 或者<中断键:ctrl-c>  从more退出


s                       Skip forward k lines of text [1]
s                       (从当前行)向前跳过K行文本,[默认值为1]


f                       Skip forward k screenfuls of text [1]
f                       (从当前行)向前跳过 k屏幕的文本 [默认值为1]


b or ctrl-B             Skip backwards k screenfuls of text [1]
b or ctrl-B             (从当前行)往后(回)跳过 k屏幕文本 [默认值为1]


'(single quotes)      Go to place where previous search started
' (单引号)             (从当前行)回到先前开始搜索的地方


=                       Display current line number
=                       显示当前行号


/<regular expression>   Search for kth occurrence of regular expression [1]
/<正则表示式、模式>      查找正则表达式第k次发生的位置 [默认值为1]


n                       Search for kth occurrence of last r.e [1]
n                       查找自从上次正则匹配往后的k次匹配的位置 [默认值为1]  (next)


!<cmd> or :!<cmd>       Execute <cmd> in a subshell
!<cmd> 或者 :!<cmd>     在子shell中执行 cmd命令


v                       Start up /usr/bin/vi at current line
v                       在当前行启动 /usr/bin/vi  


ctrl-L                  Redraw screen
ctrl-l                  重绘屏幕


:n                      Go to kth next file [1] 
:n                      跳到当前文件后面的第k个文件 [默认值是1]      
                        // touch {1,2,3,4,5,6,7,8,9,10}.txt
                        // more *.txt


:p                      Go to kth previous file [1]
:p 跳回到当前文件前面的第k个文件 [默认值为1]


:f                      Display current file name and line number
:f   显示当前的文件的文件名和行号(光标所在行)


.                       Repeat previous command
. (dot)          重复上一个命令(相当于一个宏命令)   
-------------------------------------------------------------------------------


说明: 1) 在more模式下: 

k命令 //上述命令列表中命令,k是命令的前导参数。

             2) 参考基准:   

 a: 行跳转以当前行为基准

 b: 文件跳转,以当前打开的文件为基准。 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics