When I grep the man page of the find command for matches to type it returns a lot of search results that I don't want. Instead I want to use a command that returns only the search results for -type.The command man find | grep -type doesn't work. It returns:grep: invalid option -- 't'
grep the man page of a command for hyphenated options
grep;man;options
If you want to grep for a pattern beginning with a hyphen, use -- before the pattern you specify.man find | grep -- -typeIf you want more info, for example the entire section describing an option, you could try using Sed:$ man find | sed -n '/-mindepth/,/^$/p'   -mindepth levels          Do  not apply any tests or actions at levels less than levels (a          non-negative integer).  -mindepth  1  means  process  all  files          except the command line arguments.However, this won't work for every option you might search for.  For example:$ man find | sed -n '/^[[:space:]]*-type/,/^$/p'   -type c          File is of type c:Not very helpful.  Worse, for some options you could be misled into thinking you'd read the whole text about the option when you really hadn't.  For example, searching -delete omits the very important WARNING contained as a second paragraph under that heading.My recommendation is to use a standard call to man with the LESS environment variable set.  I use it quite commonly in my answers on this site.LESS='+/^[[:space:]]*-type' man findTo learn more about how this works, see:LESS='+/^[[:space:]]*LESS ' man lessLESS='+/\+cmd' man lessLESS='+/\/' man lessIf you just want to find the option quickly and interactively in the man page, learn to use less's search capabilities.  And also see:How do I use man pages to learn how to use commands?