Let's say I want to find the string "invalid" in files of type *.cp across subdirectories.
grep -r --include=*.cp "invalid" .
"-r" means look recursively
"." means look in this directory
You can also add other file types at the same time
grep -r --include=*.cp --include=*.h "invalid" .
No comments:
Post a Comment