Quick searching with grep

Posted: February 24th, 2008 | Author: | Filed under: Uncategorized | Tags: , | 831 Comments »
find ./ -name "*.php" -print0 | xargs -0 grep -ls 'words words words'

Here’s a faster way to grep. If you know the type of file you want to look for (let’s say PHP), there’s no need to grep through everything (like images, or log files).



Leave a Reply

You must be logged in to post a comment.