"grep -r" is the way. if u use git, it is git-grep -r etc. (git know where are all the C files - via git-ls-files) On Sat, Nov 1, 2008 at 4:21 PM, Manish Katiyar <mkatiyar@xxxxxxxxx> wrote: > On Sat, Nov 1, 2008 at 1:15 PM, loody <miloody@xxxxxxxxx> wrote: >> Dear all: >> "grep 'test' *.h" will search pattern "test" in all header file at the >> current folder. >> if I want grep do the same thing recursively, I try to use "grep -r >> 'test' *.h" and it complains no *.h such file. >> Would anyone know how to use grep to search specific file recursively? > > This is really not a kernel question......but anyway the following > command should be good enough for you. > > find . -name '*.h' -exec grep test {} /dev/null \; > > Thanks - > Manish > > >> appreciate your help, >> miloody >> >> -- >> To unsubscribe from this list: send an email with >> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx >> Please read the FAQ at http://kernelnewbies.org/FAQ >> >> > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- Regards, Peter Teoh -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ