I want to get the explanation for !
option (which means exclude) in find
command in the man find
.
And then I press /
and shift + 1
, a Non-match
popped out, instead of !
So my question is how to search for !
in a manpage?
documentationmanpage
Best Answer
The default
man
pager isless
. If you look atless
's help (pressh
while in it), you'll see:Or in
man less
:So, a pattern of just
!
is an empty pattern (which matches anything) negated - so nothing will match it.You'll have to escape the significance of
!
at the start of a pattern, by either using a backslash (\!
), or otherwise making it not the first character of the regex (/[!]
, for example).The other way is to use
grep
: