Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
Securely search database(s) of filenames and print matches. Works like locate, but it also stores file permissions and ownership information so users cannot see files to which they don't have access. In some distributions, locate is actually a symbolic link to slocate.
Options
-c
Check the configuration file, /etc/updatedb.conf, when updating the database.
-dpath, --database=path
Specify the path to the database(s) to search.
-edirs
Omit the specified directories from the database. Used with -u or -U.
-ffstypes
Omit the files on the specified filesystems from the database.
-h, --help
Display help information and exit.
-i
Perform a case-insensitive search.
-llevel
Specify security level. If level is 0, turn off security checking to speed up searches. If level is 1, turn on checking. The default is 1.
-nnum
Limit the number of results to num.
-ofile, --output=file
Specify the database file to create with -u or -U.
-q
Run in quiet mode, suppressing error messages.
-rregexp, --regexp=regexp
Search the database using the specified POSIX regular expression.
-u
Create an slocate database starting at /.
-Udir
Create an slocate database starting at the specified directory.
-v, --verbose
Run in verbose mode, displaying the files when creating the database.