Luke Tupper Consulting

Luke Tupper Consulting Blog

Searching for files with content via Linux Command line

June28

I needed to search for files with a common bit of content on a host that I had connected to ssh.

This example searches all php files for ‘Search Term’, it search every sub directory from the current directory and prints out the name:


find . -name "*.php" -exec grep -l "Search Term" {} \;