0

You cannot search ! directly because it puts process behind. For instance, you cannot search ! in sed man.

How can you search ! in man?

3
  • 2
    If you are using less as man pager then /\!. – jimmij Jun 26 '15 at 18:17
  • You can escape it by \ = \! – Costas Jun 26 '15 at 18:17
  • @jimmij Good! I use normally less but now I used man and got confused. – Léo Léopold Hertz 준영 Jun 26 '15 at 18:19
2

man itself is a tool to format manual pages, not to browse them. The tool you use to browse the man pages is a pager. The default pager on most systems is less.

In less, when you press / or ? to search, a few characters have a special meaning if you type them at the beginning of the search expression. The exclamation mark is one of them. To avoid ! having a special meaning, put a backslash before it. It is very common for backslash to mean “interpret the next character literally”.

So to search for an exclamation mark, press /\! Enter.

1
man -k \!

Not sure that is what you are really asking?

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.