Date: Thu, 10 Jul 2008 17:58:48 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Daniel Gerzo <danger@FreeBSD.org>, Roger Olofsson <raggen@passagen.se>, FreeBSD <freebsd-questions@FreeBSD.org> Subject: Re: Locate command Message-ID: <48763FC8.2090107@infracaninophile.co.uk> In-Reply-To: <20080710150008.GD99511@remdogbsd> References: <20080710150008.GD99511@remdogbsd>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig1D46AD73E5EB8D0315E05898
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Rem P Roberti wrote:
>> Hello,
>>
>>>> Actually, the very first thing I always do after installing a FreeBS=
D is
>>>> add this line to crontab:
>>>>
>>>> 00 02 * * * /usr/libexec/locate.updatedb
>>>>
>>>> I guess I'm a locate-freak ;^D
>>>>
>>> Done. Thanks again.
>> You guys should rather use /etc/periodic/weekly/310.locate script
>> to update your locate database.
>=20
> I'm pretty new to all of this, so how does one go about invoking that
> script?
Well, to run it by hand you type:
/etc/periodic/weekly/310.locate
Otherwise it will be run automatically by the periodic(8) system.=20
It is enabled by default:
happy-idiot-talk:~:% grep locate /etc/defaults/periodic.conf=20
# 310.locate
weekly_locate_enable=3D"YES" # Update locate=
weekly
You can create a file /etc/periodic.conf to control turning on
or off or to tweak parameters for any of the periodic scripts.
As the name suggests it's a weekly script, and if you look at
/etc/crontab you will see the line:
15 4 * * 6 root periodic weekly
Or in other words, it runs at around 4:15am on Saturdays.
If you wanted to run it every day, then you'ld copy it to
/usr/local/etc/periodic/daily/310.locate, globally substitute
daily_locate for weekly_locate eg. by:
sed -i.bak -e 's/weekly_locate/daily_locate/' \
/usr/local/etc/periodic/daily/310.locate
and then put both 'daily_locate_enable=3D"YES"' and 'weekly_locate_enable=
=3D"NO"' into /etc/periodic.conf
In this case it would be run by the periodic system like so:
1 3 * * * root periodic daily
that is: at 3:01am every day.
Cheers,
Matthew
--=20
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
--------------enig1D46AD73E5EB8D0315E05898
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREIAAYFAkh2P9EACgkQ8Mjk52CukIzeAgCePyCJ3LjXU5TBN02JMeP4dOct
wHEAnA+UmxknKwbBBP0pI04HSMTBLKfe
=eUoO
-----END PGP SIGNATURE-----
--------------enig1D46AD73E5EB8D0315E05898--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48763FC8.2090107>
