The less command is the way most Linux users open a file for reading, and it also can be used to search.
For example, if you want to open a file and search for a word, you can run this:
less +/yourword /path/filename # there is a space after "yourword".
This command will highlight all instances of the word.
没有评论:
发表评论