Find words in many files
- by ant2009
Hello,
I am looking for this struct messages_sdd_t and I need to search through a lot of *.c files to find it. However, I can't seen to find a match as I want to exclude all the words 'struct' and 'messages_sdd_t'. As I want to search on this only 'struct messages_sdd_t' The reason for this is, as struct is used many times and I keep getting pages or search results.
I have been doing this without success:
find . -type f -name '*.c' | xargs grep 'struct messages_sdd_t'
and this
find . -type f -name '*.c' | xargs egrep -w 'struct|messages_sdd_t'
Many thanks for any suggestions,