seems this holds good for all programs, defined by the ARG_MAX limit:
http://lxr.linux.no/source/include/linux/limits.h
saha
--
| -----Original Message-----
| From: Muthukumar [mailto:ramana_muthu@xxxxxxxxxxx] ;
| Sent: Monday, March 14, 2005 10:24 AM
| To: ilugc@xxxxxxxxxxxxx
| Subject: Re: [Ilugc] grep error
|
|
| >
| > grep <pattern> *
| >
| > It throws the following error:
| > ksh: /usr/bin/grep: arg list too long
| >
| > can any one tell me what is the reason ? and how to
| solve this issue ?
|
|
| > NOTE: The directory contains some 15000 file
| This is the problem. grep is having ability to do pattern
| search for few number of files.
|
| Try as,
|
| find <dir> -type f | xargs grep <pattern>
|
| HTH.
|
| Thanks,
| -Muthukumar.
|
|
|
| _______________________________________________
| To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with
| "unsubscribe <password> <address>"
| in the subject or body of the message.
| http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
|
|