2012年3月5日星期一

using “less” command to find some text in a file

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.

没有评论: