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

Phương Linh

New member
How do I search for a specific word in a file in Ubuntu?
Answer
4 Answers
  1. locate {part_of_word} This assumes your locate-database is up to date but you can update this manually with: sudo updatedb.
  2. grep as explained by dr_willis. One remark: -R after grep also searched within directories. …
  3. find . – name ‘*{part_of_word}*’ -print.
 

Tìm kiếm

Back
Top