Search For Strings Across Files in Linux

Search For Strings Across File Bodies Using The Terminal on Linux Machines

Need to search for strings across files in Linux or on a Linux server? Use GREP! This will help you find that pesky module that needs updating or that misspelled table name.

My Computer Setup

  • macOS

The Solution

grep -rl '/path/you/want/to/search' -e 'search_string'

This command will recursively search files and folders for whatever you’re interested in. Still learning about how to maneuver the terminal? Check out this article!

Leave a Comment Cancel reply

Exit mobile version