RE: [ILUG] find regex question

From: Kenn Humborg (kenn at domain bluetree.ie)
Date: Tue 18 Jun 2002 - 17:48:06 IST


> On June 18, padraig at domain antefacto.com said:
> >
> > yuk. Why put regex in find?
> > How about piping output of find to grep -E '[^/]*/[-0-9A-Z]{36}\.'
>
> Why run two processes when you can run one?

Well, chances are the find process will be I/O-bound while
the grep will be CPU-bound. So you might find it faster
running them as two processes - grep can be evaluating the
regex while find is waiting for more stuff from the disk.

Of course, it is possible that find is multi-threaded or uses
non-blocking I/O (if it's possible to do non-blocking
directory lookups on Linux or Unix). Anyone want to look
at the source?

Later,
Kenn



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:17:20 GMT