0

I came across the post at How do I search for a word or a phrase in the Linux 'man' command and cycle through the found solutions? which explains the ability to cycle to the next pattern but how do I get it cycle through when it has passed the a pattern assuming it only occurs once or when I get to the bottom of the page?

For example once I have run the command man dpkg I pass / followed by simulate. This takes me to the pattern however it only works when I am the top of the page. If I am past the pattern, it does recursively search the entire man page.

1 Answers1

1

man does not have an option to continue searching at the top of page once you reach the bottom, so pressing p is your option, or Shift-n to search backwards.

man uses less to do its paging, and less doesn't support cycling that way. So you could look at getting man to use something other than less for paging such as vim. Or alternatively, install the vim man plugin and run man from within a vim session:

:Man dpkg
Paul
  • 61,193