How can I make less show the previous couple of lines when I search for something? I'd like to get rid of the kkk steps in my usual process:
$ less -j 4 file
That will put the pattern you searched for on line 4 of the terminal.
To save typing this every time, you can put LESS=j4 into your environment.
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
4 years ago