Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep resistance



It is apparently not possible to grep 
through a directory which has a large 
number of files (perhaps the limit 
is someone near 1,000 or so). 
I happen to have a directory which has 
more than 10,000 files and found 
that grep gives the error 
"Argument list too long." 
Here is a workaround which works 
pretty well: 

find . -type f -exec grep -n -C STRING '{}' ';' | less 

problem is, it doesn't display the name of the 
file. Can this be adjusted to do so? 

Thanks! 




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links