snippetbashTip
slocate — Secure variant of GNU Locate. See also: `locate`. More information: <https://manned.org/slocate>.
Viewed 0 times
commandsecurevariantlocateclignuslocatesee
Problem
How to use the
slocate command: Secure variant of GNU Locate. See also: locate. More information: <https://manned.org/slocate>.Solution
slocate — Secure variant of GNU Locate. See also: locate. More information: <https://manned.org/slocate>.Enable quiet mode to suppress error messages:
slocate -qLimit the number of results shown:
slocate -n {{number}}Build an
slocate database starting at path /:slocate -uBuild an
slocate database starting at a given directory:slocate -U {{path/to/directory}}Update an
slocate database using the default /etc/updatedb.conf configuration:slocate -cSet the security level of
slocate, with 0 being disabled, and 1 being secure:slocate -l {{0|1}}Specify the database that
slocate should search in:slocate {{[-d|--database]}} {{path/to/directory}}Search the
slocate database using a specific regex string:slocate {{[-r|--regexp]}} {{regex}}Code Snippets
Enable quiet mode to suppress error messages
slocate -qLimit the number of results shown
slocate -n {{number}}Build an `slocate` database starting at path `/`
slocate -uBuild an `slocate` database starting at a given directory
slocate -U {{path/to/directory}}Update an `slocate` database using the default `/etc/updatedb.conf` configuration
slocate -cContext
tldr-pages: common/slocate
Revisions (0)
No revisions yet.