grep

Francois Pinard pinard at IRO.UMontreal.CA
Wed Oct 31 08:13:54 AEST 1990


In article <64 at gdx.UUCP> jay at gdx.UUCP (Jay A. Snyder) writes:

   try:
   find ./ -name "*" -exec grep "xyz" '{}' \;

   the find command will execute any command in this manner.

I do not want to restart an overlong debate about xargs security :-).
If you have many files, use instead:

   find ./ -print | xargs grep xyz

which is slighlty faster.  xargs may quite often be used in
combination with `find -print' in this manner.  The -print is not
required on the newer versions of find.
--
Franc,ois Pinard          ``Vivement GNU!''         pinard at iro.umontreal.ca
(514) 588-4656    cp 886 L'Epiphanie (Qc) J0K 1J0    ...!uunet!iros1!pinard



More information about the Comp.unix.questions mailing list