[ale] find or locate text

Michael D. Hirsch mhirsch at nubridges.com
Wed Oct 9 13:24:05 EDT 2002


On Wednesday 09 October 2002 12:17 pm, Fletch wrote:
> >>>>> "Chris" == Chris Coleman <chriscoleman at mail.clayton.edu>
> >>>>> writes:
>
>     Chris> find / -name \* -exec grep string {} \;
>
>
>         That'll start up a grep for each file.  More efficient to use
> xargs instead which will break the arguments up into batches.  That
> find invocation will also look at things such as directories and
> device files as well as plain vanilla files; better to limit with
> `-type f' rather than `-name \*'.
>
> find . -type f -print0 | xargs --null grep fooble

Why not use recusive grep: grep -r fooble *

--Michael

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.






More information about the Ale mailing list