locate.updatedb(8)

locate.updatedb8

Update locate database

Usage

locate.updatedb [--fcodes=dbfile] [--filesystems=' type ... '] [--prunepaths=' dir ... '] [--searchpaths=' dir ... '] [--tmpdir=dir]

Overview

locate.updatedb updates the database used by locate(1). It is typically run once a week by the weekly(8) script.

The options are as follows:

--fcodes

Output to an alternate database file instead of the default /var/db/locate.database. If ‘-’ is specified in place of the file name, send the database to the standard output.

--filesystems

A list of filesystem types to be traversed by find(1). The default is ' ffs ufs ext2fs '.

--prunepaths

Set the list of parent directories that should not go in the database. The default is ' /tmp /var/tmp '.

--searchpaths

Set the list of directories to be put in the database. The default is ' / '.

--tmpdir

Set the directory temporary files are stored in. The default is /tmp.

The default settings are modified by the optional configuration file /etc/locate.rc. It is a sh(1) script that can be used to set variables. The names of the variables match the names of the command line options, but in all caps.

Files

/etc/locate.rc

configuration file

/var/db/locate.database

default database

Releases

61 releases since OpenBSD 2.1; the text changed 12 times.

  1. 2.1–2.3
  2. 2.4
  3. 2.5
  4. 2.6
  5. 2.7
  6. 2.8
  7. 2.9–3.2
  8. 3.3–3.4
  9. 3.5–4.1
  10. 4.2–4.6
  11. 4.7–6.9
  12. 7.0–7.1
  13. 7.2–8.0

--fcodes since OpenBSD 2.4; --filesystems since OpenBSD 2.4; --prunepaths since OpenBSD 2.4; --searchpaths since OpenBSD 2.4; --tmpdir since OpenBSD 2.4.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.