How to Find Text Within Files on Unix

104 2
    • 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...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.