문제

When viewing a manpage say man ls, how does one search the content of the man page? (similarly, in vim you can call :/search_string what is a comprable command while viewing a man page?)

도움이 되었습니까?

해결책

It depends on which pager you use, which depends on your MANPAGER/PAGER environment variable. The manpage of man says:

If MANPAGER is set, its value is used as the name of the program to use to display the man page. If not, then PAGER is used. If that has no value either, /usr/bin/less -is is used.

Note that on Debian unstable the default is pager -s (managed by alternatives). So, if you actually are using less, just type /searchstring, similar to vim. See also the manpage of less on how to navigate in less.

다른 팁

On Ubuntu (and probably similar distributions), you type "/" followed by what you want to search for

Example:

/word

Pressing "n" jumps to the next hit

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top