How do I search for a specific string in a file in Linux?

How do I search for a specific string in a file in Linux?
Answer
Grep
is a Linux / Unix command-line tool used to search for a string of characters in a specified file. The text search pattern is called a regular expression. When it finds a match, it prints the line with the result. The grep command is handy when searching through large log files.
 

Tìm kiếm

Back
Top