Finding a file in linux and moving to the first search

I need help with the linux command, with which I can find a line in a text file and go to the first position where this line is found, and scroll down and up from there. I am looking for a watch for such a team. GREP will only detect events, print them, and exit the file. I need to be able to go to this line and scroll up and down to see other lines around.

+3
source share
1 answer

You can do this with lessor vim, for example:

less +/pattern file.txt
vim +/pattern file.txt

file.txt "pattern", . j k.

(BRE), less vim. :

less +/^settings file.txt
vim +/^settings file.txt

, "".

+4

All Articles