Name
slocate
Synopsis
slocate [options
] [search-string
]
Security Enhanced version of GNU locate. This command searches a database
listing every file on the system; it is intended as a faster
replacement for find / -name
pattern
.... (See locate in the "Alphabetical Summary of Common
Commands" section earlier in this chapter). This version
stores file permissions and ownership, in order to prevent
unauthorized access to files.
Options
-
-c
Read /etc/updatedb.conf when updating the database.
-d
file
,--database=
file
Use file as the database to search.
-e
dir1
[,
dir2
...]Exclude the given directories from the database.
-f
fstype1
[,
fstype2
...]Exclude files on filesystems of the given types (e.g., NFS).
-h
,--help
Print an option summary and exit.
-
-i
Ignore case when searching.
-
-l
level
Security level. If level is
0
, no security checks are done, providing faster searches. The default is1
, which turns on security checking.-
-n
count
Do not print more than count results.
-o
file
,--output=
file
Use file as the database to create.
-
-q
Do not print error messages (quiet mode).
-r
regex
,--regexp=
regex
Use the Basic Regular Expression regex to search the database.
-
-u
Create the database starting at /.
-
-U
dir
Create the database starting at dir.
-v
,--verbose
Display filenames when creating the database.
-V
,--version
Print version information and exit.
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.