public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Jagadeesh Bhaskar P <jbhaskar@hclinsys.com>
To: Ankit Jain <ankitjain1580@yahoo.com>
Cc: Linux Newbie <linux-newbie@vger.kernel.org>
Subject: Re: Locate Vs Find
Date: Tue, 23 Nov 2004 10:13:30 +0530	[thread overview]
Message-ID: <1101185010.3786.9.camel@myLinux> (raw)
In-Reply-To: <20041122165244.62360.qmail@web52904.mail.yahoo.com>

On Mon, 2004-11-22 at 22:22, Ankit Jain wrote:
> Which is more efficient? /if both perform the same
> work and are not different then why shoudl we have 2 ?

As far as I know, locate is based on a database storing locations of
file. It doesnot search physically throughout the directory hierarchy.
So it is many a time faster. But you have to update the database
periodically with an "updatedb" command. Otherwise even error locations
may be the result.

Find doesnt depend on any such databases. It searches throughout the
directory hierarchy. This case results are always more reliable, but
mostly slow. 

It can be seen by "finding" a file from the "/" and "locating" the same.

I think that trade-off enough a reason!!

-- 
With regards,

Jagadeesh Bhaskar P
R&D Engineer
HCL Infosystems Ltd
Pondicherry
INDIA

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2004-11-23  4:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-22 16:52 Locate Vs Find Ankit Jain
2004-11-23  4:43 ` Jagadeesh Bhaskar P [this message]
2004-11-25 21:00   ` lindax newbie
2004-11-28 14:13     ` J.
2004-12-02  5:07 ` Stephen Samuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1101185010.3786.9.camel@myLinux \
    --to=jbhaskar@hclinsys.com \
    --cc=ankitjain1580@yahoo.com \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox