I am new to Linux. I want to search a string in log file. In search result I want only lines which contains that string.
Try this:
$ grep <string> <file>
where <string>
and <file>
represent the string you are looking for and the name of the file, respectively. You might also want to read up on the grep command as it is very powerful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With