How to grep recursively on Solaris

grep -r doesn't work on Solaris. You can only grep on files in the current directory.

A workaround is to use grep with find:

find ./ -type f -exec grep "foo" {} +
Kim Klotz Over 12 years ago