Cole Tuininga wrote:
On Wed, 2004-12-22 at 07:14 -0500, Travis Roy wrote:

 Or:

slocate -i mozilla

or "find / | grep -i mozilla"


Tell you what, we'll time the two and see which comes back quicker.  8)


time locate 0047 0.12user 0.03system 0:00.14elapsed time find / |grep 0047 0.42user 1.17system 2:52.24elapsed time find / -name "0047*" 0.37user 0.64system 1:51.99elapsed

140 milliseconds vs. almost 2 or 3 minutes

Of course, you need both tools. locate only helps
if it has already built the locate database. Recent
stuff still needs find. And, I usually have an idea
where to start finding something, so I don't need
to search the whole file system.

time find /var/www/html/joesalter -name "0047*"
   0.01user 0.04system 0:00.05elapsed

50 milliseconds vs. 140 milliseconds

So, which is quicker? ;-)

The answer, of course, is "it depends."

Anyways, *I* use both.

--
Dan Jenkins ([EMAIL PROTECTED])
Rastech Inc., Bedford, NH, USA --- 1-603-206-9951
*** Technical Support for over a Quarter Century
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss

Reply via email to