Maybe some of your files have spaces or other white space in the file name, which means xargs treats them as two separate file names, not one. This is unusual for files in /etc however. If this is the case, you can ask find to de-limit output with the NUL character (using the -print0 option), and tell xargs to split on NUL (the -0 option).
Also, grep does not like to grep directores - you will want to tell find to only print files, not directories, using "-type f", and you may also want find to follow symbolic links (it does not by default, so if the files you are interested in are in a linked directory, they will be skipped - use -follow).
Putting it all together we have:
Code:
find /etc -type -f -follow -print0 |xargs -0 grep 'mystring'
Another, much simpler way to achieve much the same thing, is to tell grep to recurse into sub-directories:
Code:
grep -r mystring /etc