Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've installed unixutils,and grep string * can search string in the current directory,

but how to make it search recursively?

share|improve this question

2 Answers 2

Use the -R switch for a recursive search (or -r or --recursive).

from the man page:

-R, -r, --recursive
          Read all files under each directory, recursively; this is equiv-
          alent to the -d recurse option.
share|improve this answer

Alternatively, if you don't need grep-specific functionality: Windows supports this out of the box anyway:

findstr /s "string"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.