LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-25-2004, 05:59 AM   #1
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Rep: Reputation: 32
using locate command


Hi,

The lcoate command is a quick way of finding files, because it refers to a database of file location information.

However, on my Knoppix HD install, if the database is more than 8 days old, it actually *refuses* to look. That's what you call impertinence!

You see, in many cases the files are much older than 8 days, and I don't want to use "find".

However, instead of hitting the computer :-), I look up "man locate" which turns out to be a very short file, which says very little.Moreover, it doesn't say how to change this 8 day limit.

I looked up "man updatedb", but this is a really big file, and - I didnt read it all - I couldn't find a way to change this limit in it.

So I was hoping somebody here might know .....
 
Old 03-25-2004, 06:22 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Run the command 'updatedb' as root to update the locate database.
 
Old 03-25-2004, 06:49 AM   #3
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Original Poster
Rep: Reputation: 32
Thanks for the answer, but I should have mentioned I didn't want to do that either.

I happen to know that the file I'm looking for is well over 8 days old. So it's not efficient to run updatedb for it.
 
Old 03-25-2004, 12:48 PM   #4
virid
LQ Newbie
 
Registered: Mar 2004
Location: NYC
Distribution: Slackware
Posts: 9

Rep: Reputation: 0
Did you try running "updatedb" as root?
 
Old 03-25-2004, 04:20 PM   #5
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Original Poster
Rep: Reputation: 32
Thank you for your replies. I'm not sure if you're getting my point.

I refuse to run updatedb if the file I'm looking for is over 8 days old. I want to access the locatedb without updating it.

This is Linux. The 8 days should be configurable. I want to know how. Sure I can run updatedb, I probably will, soon. But I want to know how to get over that 8 day barrier.
 
Old 03-26-2004, 05:07 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Updatedb should be run by a cron job automatically. However, if you turn off your computer, the cronjob does not run. Make sure you have anacron installed.

I think you are misunderstanding the error. The 8 day limit is because the updatedb is too old, not the file itself.

updatedb is a script file that runs slocate. The configuration file is located at /etc/updatedb.conf
 
Old 03-26-2004, 05:13 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Updatedb should be run by a cron job automatically. However, if you turn off your computer, the cronjob does not run. Make sure you have anacron installed.

I think you are misunderstanding the error. The 8 day limit is because the updatedb is too old, not the file itself.

updatedb is a script file that runs slocate. The configuration file is located at /etc/updatedb.conf
 
  


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
locate command missing arnott Suse/Novell 2 02-19-2005 10:29 AM
Locate command matt1982 Linux - General 3 01-09-2005 12:22 AM
How to use locate command MartinOG Linux - Newbie 3 06-07-2004 02:59 PM
What command will locate a particular.. cbjhawks Linux - General 1 03-21-2004 09:07 AM
Locate command does not work waffe Linux - General 2 09-26-2003 10:54 PM


All times are GMT -5. The time now is 08:07 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration