LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-03-2005, 01:56 AM   #1
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
Searching ???


If we can find everything from find command than why is there slocate or locate commands present in linux?
 
Old 01-03-2005, 03:24 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Variety. If I can create a text file with vim, why is there anything else, much less 15 thousand alternatives?

Cool
 
Old 01-03-2005, 03:29 AM   #3
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
Re: Searching ???

Quote:
Originally posted by ilnli
If we can find everything from find command than why is there slocate or locate commands present in linux?
hi there,

in the case of slocate, the search is based in a binary database file. what makes much faster. that is why you need always to run updatedb to keep that up to date.
AFAIK, find will search the tree directory structure in your filesystem. what is robust but not that fast.

regards

slackie1000
 
Old 01-03-2005, 04:20 AM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
The following discussion covers this topic pretty well.

Locate vs. find
 
Old 01-03-2005, 04:27 AM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally posted by /bin/bash
The following discussion covers this topic pretty well.

Locate vs. find
Nice link. This guy took my answer, which I think is the essence of it.

Quote:
That's not true, they do not preform the same task.
`find' doesn't find files, it's just a side effect of
the program. `Find's' real occupation is to evaluate files.
a.k.a. to preform tests on them...
s/pre/per/

Wouldn't so much call it a side-effect, as a preliminary step, though. But people are missing a kicking tool if they only use it to find stuff and not do stuff to what they've found.
 
Old 01-03-2005, 04:27 AM   #6
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
Quote:
Originally posted by /bin/bash
The following discussion covers this topic pretty well.

Locate vs. find
hi there,

indeed. nice link.
thanks

regards

slackie1000
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for HotSpots? carlosinfl Linux - Wireless Networking 4 02-23-2005 09:17 PM
searching for a application ??? MeTaL-NL Linux - Software 2 02-22-2005 07:47 AM
searching zoodle General 3 01-02-2005 08:11 PM
I have been searching but.... Jacksenflamed Linux - Newbie 6 03-17-2004 08:26 PM
Searching mjgeiger Linux - Newbie 4 06-05-2002 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration