Setup:
-Directory tree
top
|--sub1
|--sub2
\--sub3
-Each of the subX directories have *.c files in them.
-The top directory does NOT have any *.c files in it.
-I am currently in the top directory.
Goal:
-Find the string "foobar" every place that it occurs in the *.c files in
all of the subX directories.
Command and result:
[adayley@locatlhost top]$ grep -ir foobar *.c
grep: *.c: No such file or directory
[adayley@locatlhost top]$
Question:
I gave the 'r' option for a recursive search and I know that the subX
diretories have *.c files. But, grep appearently does not decend into
the subX directories because the top directory has no *.c files. How do
I make it search the subX directories anyway?
Alan