How to Find Text Within Files on Unix
- 1). Open a terminal window. This will provide you with a command prompt where you will type the following commands.
- 2). Type the command "grep string file1 file2 file3" to search for the word "string" within the files "file1," "file2" and "file3." The command will return all of the lines in any of the files which contains the word "string."
- 3). Type the command "exit" to close the terminal window.
Source...