Last Updated: February 25, 2016
·
749
· sheerun

Search through file with less

For example to search for some_method in model.rb:

less -p some_method model.rb
  • Use n key to search for next match
  • Use v key to edit file on selected line.