I opened a file using the more pager,i was trying to find a string in this file using / as shown in the figure below,but it is saying that pattern not found even though the string i have searched is present in the file,in the second case when i tried to find and string ,it is not showing any thing on hitting enter,and just showing the next page on screen.Again the and string is present in the file,still it is not found on hitting enter. What wrong am i doing here and why there are two different results with these two different strings

Searching a string <code>random</code>

Pattern is not found

Searching another string <code>and</code>

Nothing happens on pressing enter,it shows the next page on screen

  • In the first case, I think it's just telling you that there is no further instance of random below the one that's already shown at the top of the screen; in the second case, it's likely paging forward because almost every screen contains and. Perhaps you are just surprised because the match is not highlighted - as it would be by default in the less pager? – steeldriver Jan 21 at 14:50
  • I have one more, i understand that using space we move forward by a screen but i am not able to understand the function of f and b key in more ,how navigation is defined using these two keys ? – Noshiii Jan 21 at 15:08

I got it,it was actually finding the string but the main difference between more and less is that the string when found in more is not highlighted,that's why i was getting confused.For more explanation check the comment section.

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.