I'm new to linux and grep, and trying to find my way around.
By using find -name *.java
I am able to find the names of all of the java files in a particular directory. Suppose I want to count the number of times foo
occurs in these files, how would I do that?
I'be been trying things like:
grep -r "foo" *.java
and getting responses like:
grep: *.java: No such file or directory
Any ideas?