Blog Blog · March 6, 2007 · 1 min read

Search with Find, Xargs, and Grep

How To

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?”: