Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jun 2002 23:11:19 -0400 (EDT)
From:      Peter Leftwich <Hostmaster@Video2Video.Com>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        FreeBSD LIST <FreeBSD-Questions@FreeBSD.Org>
Subject:   Re: find vs. `ls -alR | grep -i keyword`
Message-ID:  <20020605230722.V45306-100000@earl-grey.cloud9.net>
In-Reply-To: <20020603031720.GA94033@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2 Jun 2002, Dan Nelson wrote:
> "locate" beats them both (but works off a precomputed index).  find will be faster, if only because it doesn't bother to print stats on every file only to get most of it suppressed by grep.

It turns out my /var/db/locate.database file is 0 bytes and `man locate`
doesn't exactly tell the use a good weight-gain formula for it... so I'll
stick to beefing up my "find" command lines :)

> > Invariably, I surprise myself when a conglomeration such as `find /cdrw -name "*deep\ water*" -print` actually prints useful information
> no; you never need a slash after directories in any command, unless it's an output file and you want to tell the command to create it, and
> no; because your argument is quoted.  If you didn't quote it, you would have had to write \*deep\ water\* .
> 	Dan Nelson <dnelson@allantgroup.com>

Ah ha, learning is happening as I write this.  However, how would you
locate a file named '***dan_is_really_cool***' if your extension to my
example holds true? i.e. I used -name "*deep\ water*" and you used \*deep\
water\* for yours.

--
Peter Leftwich
President & Founder
Video2Video Services
Box 13692, La Jolla, CA, 92039 USA
+1-413-403-9555


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020605230722.V45306-100000>