Linux Man Page – Open and Search for String in One Command

linuxmansearch

Instead of doing man chmod and then /a+x to jump to the first section in the chmod man page that mentions a+x, I would like to know if there is a way to open the man page to a specific search string, similar to how you can do vi +string filename.txt in vi(m).

Best Answer

Try this trick:

man chmod | less +'/a\+x'

or

man chmod | more +'/a\+x'

With a backslash before the + sign because what comes after / is an extended regular expression.

Related Question