How do I search for a specific word in a file in Unix?

Trương Duy

New member
How do I search for a specific word in a file in Unix?
Answer
The UNIX Grep command searches files for a user-specified text pattern. It returns a list of the matching words or shows each line of text that contains them. You can broaden the results by using wildcards. Grep also has the ability to count instances of a search phrase that appear in a file.
 

Tìm kiếm

Back
Top