Search with Find, Xargs, and Grep

I’ve watched people search for character matches on Unix and Linux machines at times with not a lot of success. A very good way to make this search on a Unix/Linux box is to use the find, xargs, and grep commands:

find . | xargs grep “criteria”

This will allow you to search recursively for the criteria.

On edit: the link below has a longer discussion titled “How can I recursively grep through sub-directories?”:

Post written by Ed Reckers

Founder and lead web development consultant at Red Bridge Internet : San Francisco WordPress Developers and Consultants.

Leave a Reply