LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-13-2007, 08:06 PM   #1
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
locate


What database does 'locate' use?
 
Old 05-13-2007, 08:17 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
This applies to Slackware, but I'll bet other distributions are similar.

The locate command actually runs a program called slocate. You use this program to locate files quickly. One way to configure it properly (as it is in Slackware) is to create a cron job which runs slocate in the wee hours of the morning with a special option to update the database.

For more information:

Code:
man 1 slocate
man 1 updatedb
man 1 crontab
Hope this helps.
 
Old 05-13-2007, 08:28 PM   #3
vxc69
Member
 
Registered: Jul 2004
Distribution: Ubuntu
Posts: 387

Rep: Reputation: 33
Check /var/lib/slocate

If it's not there try looking for slocate.db.


Hope this helps,
vxc

Last edited by vxc69; 05-13-2007 at 08:29 PM.
 
Old 05-13-2007, 10:58 PM   #4
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
err? I thought u should run updatedb in cron?
 
Old 05-14-2007, 04:38 AM   #5
vxc69
Member
 
Registered: Jul 2004
Distribution: Ubuntu
Posts: 387

Rep: Reputation: 33
Quote:
Originally Posted by kstan
err? I thought u should run updatedb in cron?
Updatedb creates an index of the locations of files with their filenames for quick searching. It is run by cron so that this index is created regularly. There is no reason why you can't run updatedb anytime you want (it just takes a long time on most systems with lots of files).



vxc
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cpan> locate -u Unknown shell command 'locate -u'. Type ? for help. sharad2005 Linux From Scratch 1 08-04-2006 12:40 AM
Trying to locate some RPMs MagusYilie Linux - Software 2 05-07-2006 07:59 PM
locate juanb Linux - Newbie 2 12-18-2003 05:36 AM
Can't locate locate hindenbergbaby Linux - Newbie 3 10-22-2003 04:13 PM
how to locate ? jamaso Linux - General 4 10-17-2002 03:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:32 PM.

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