ric*_*lla 15 command-line manpage
当我打开命令的手册时(man wget例如),手册可能有数百行长。我怎样才能得到:
Gep*_*nzo 21
当在文档查看器里面通过 man 命令时,按h或H以查看 man 的帮助。
从 man 的帮助屏幕:
JUMPING
g < ESC-< * Go to first line in file (or line N).
G > ESC-> * Go to last line in file (or line N).
p % * Go to beginning of file (or N percent into file).
Run Code Online (Sandbox Code Playgroud)
另一个好主意是按Home或End键。:)
祝你好运!
已经建议了执行此操作的正常方法(请参阅@geppettvs-dconstanzo 的回答)。这留下了许多不自然、错误和糟糕的方式。
所以我会处理其中的几个。
首先,您不必从终端阅读手册页(即使它会让您成为更好的人)。例如,您可以在 html 中阅读它们。
您可以从系统上的源代码自己生成 html,但转到manpages.ubuntu.com 会更容易。
这是一个庞大的bash页面,变成了轻巧且蓬松的 Web 可渲染 html:
来自 manpages.ubuntu.com 的 Bash 手册页
这是一个实际上很有用的技巧:用于tail从手册页输出的末尾切出一些行,然后查看。
最不实用,最琐碎:
man bash | tail -100
Run Code Online (Sandbox Code Playgroud)
可能有用:
man bash | tail -1500 | more
Run Code Online (Sandbox Code Playgroud)
(或man bash | tail -1500 | less)
更有用(如果设计):
$ man bash | wc -l # how many lines are in the man-page?
5375
$ man bash | tail -2600 | less # jump to the middle of the output
Run Code Online (Sandbox Code Playgroud)
当然,这就是我要做的:
man tac | tac | less
(尽管您可能会开始man tac向前阅读。)
| 归档时间: |
|
| 查看次数: |
24992 次 |
| 最近记录: |