Skip site navigation (1)Skip section navigation (2)
Date:      05 Oct 2000 10:39:02 -0400
From:      Lowell Gilbert <lowell@world.std.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: linux-like locate?
Message-ID:  <441yxvxshl.fsf@lowellg.ne.mediaone.net>
In-Reply-To: danm@prime.gushi.org's message of "5 Oct 2000 14:26:15 %2B0200"
References:  <Pine.BSF.4.21.0010050811090.37137-100000@prime.gushi.org>

next in thread | previous in thread | raw e-mail | index | archive | help
danm@prime.gushi.org (Dan Mahoney, System Admin) writes:

> Hey all, I had an experience with locate on a linux system once, and I
> noted that for regular users, it displayed world-readable directories,
> whereas if you ran locate as root, it automatically had a separate
> database which seemed to index the whole hard drive (including /var/log,
> etc).  Is there any way to get this functionality under FreeBSD?

Sure.  The '-d' option to locate(1) will let you search an alternate
database, and you can run locate.updatedb(8) as root if you want, to
generate an alternate database that includes all the files.

If you want it to be invisible, you'll need to do the database updates
from a cron job, and alias (or wrap) the locate(1) executable for the
root account.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?441yxvxshl.fsf>