How to display line numbers in less (GNU)?
有人知道在左栏中减少显示行数的命令吗?
From the manual:
-N or --LINE-NUMBERS Causes a line number to be displayed at the beginning of each line in the display.
You can also toggle line numbers without quitting less by typing -N
.
It is possible to toggle any of less's command line options in this way.
您也可以在less
打开时按下=
键(在屏幕底部)显示有关当前屏幕的信息,包括行号。
You could filter the file through cat -n
before piping to less
:
cat -n file.txt | less
Or, if your version of less
supports it, the -N
option:
less -N file.txt
链接地址: http://www.djcxy.com/p/53292.html
上一篇: 强制链接器在创建共享库时导出已解析的符号
下一篇: 如何显示少于(GNU)的行号?