I want to search in many many files for a string.
I used find /archive/* -print0 | xargs -0 grep 'robert' -sl
Is there a simple method to do it ?
The shell expands *
. Just omit it, and find
will figure out what to do.
find /archive -print0 | xargs -0 grep 'robert' -sl
There is no need for find
. Just use.
grep -m 1 -rsl 'robert' archive/