linux常用命令less选项

<span style="font-size:18px;">-N  ........  --LINE-NUMBERS
                  Use line numbers. 显示行号.
</span>

<span style="font-size:18px;">-m  -M  ....  --long-prompt  --LONG-PROMPT
                  Set prompt style.  读取文件的百分比,行号及总行数.
</span>
<span style="font-size:18px;">
</span>

<span style="font-size:18px;">q  :q  Q  :Q  ZZ     Exit.</span>

<span style="font-size:18px;"></span><pre name="code" class="plain"><span style="font-size:18px;">   j    Forward  one line   (or N lines).
   k    Backward one line   (or N lines).
  f   Forward  one window (or N lines).
  b    Backward one window (or N lines).
</span>


<span style="font-size:18px;"> /pattern          *  Search forward for (N-th) matching line.
  ?pattern          *  Search backward for (N-th) matching line.
</span>

<span style="font-size:18px;">  g  <  ESC-<       *  Go to first line in file (or line N). 按了g,再输入行号.看看跳转行号效果
  G  >  ESC->       *  Go to last line in file (or line N).</span>

一般情况下用 less file或者less -MN file.

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。