Find Argument list too long

findlinuxxargs

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 ?

Best Answer

The shell expands *. Just omit it, and find will figure out what to do.

find /archive -print0 | xargs -0 grep 'robert' -sl
Related Question