How to find a string or text in a file on Linux - Linux Tutorials
https://linuxconfig.org/how-to-find-a-string-or-text-in-a-file-on-linux
WebJan 21, 2023 · To search a file for a text string, use the following command syntax: $ grep string filename. For example, let’s search our document.txt text document for the string “example.” $ grep example document.txt. Searching a file for a text string with grep. As you can see from the screenshot, grep returns the entire line that contains the word “example.”
DA: 36 PA: 90 MOZ Rank: 37