Subject: Re: What's up with "locate" ?
To: village idiot <village_ldi0t@yahoo.com>
From: Audun Arnesen Nordal <audun@stud.cs.uit.no>
List: netbsd-help
Date: 03/15/2002 13:14:56
On Fri, 15 Mar 2002, village idiot wrote:
> Hello good people,
>
> I'm not that bright, and I have a somewhat stupid
> question I guess.
>
> Is the command "locate" set to only browse in certain
> directories? I can not get the bloody thing to locate
> files for me other than in certain directories, whilst
> on my Linux machine it seems to work like a charm.
>
> I guess I could do an ls -R and grep, but that takes
> ages.
>
> Anyone got any clues? Because I ain't got a clue what
> to do.
locate(1) only searches a pre-built database built by
/usr/libexec/locate.updatedb . If you have a stock netbsd installation,
the database is recreated by cron in /etc/weekly, i.e. once a week.
There locate.updatedb it is run as user nobody, and can only write entries
of files that user nobody can see (ie if you have mode 700 on your home
directory, the locate-database won't get updated with files from your
home-directory (unless you call yourself 'nobody' :-) ))
Regards
--
Audun Nordal