LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   standard grep question. "The parameter list is too long" (https://www.linuxquestions.org/questions/linux-general-1/standard-grep-question-the-parameter-list-is-too-long-566198/)

antis 07-03-2007 01:11 AM

standard grep question. "The parameter list is too long"
 
I have a large number of files, sometimes > 1000, in which I want to search for a number. The following returns in error "the parameter list is too long":

grep 12345 /my/path/*

I cannot limit the number of files by using something like "A*" because I need to search all files. So, my question is how would I do to get around the "parameter list is too long" error?

I am using korn-shell on AIX, btw...

antis 07-03-2007 01:43 AM

I think I found an answer to my own question:

find /my/path/ -exec grep 12345 {} \;

...but is there any other way? Just curious :)


All times are GMT -5. The time now is 04:41 PM.