The Wayback Machine - https://web.archive.org/web/20090122225210/http://linux.about.com:80/od/commands/l/blcmdl1_locate.htm
locate - Linux Command - Unix Command

Linux

  1. Home
  2. Computing & Technology
  3. Linux
Linux / Unix Command: locate
Command Library

NAME

slocate - Security Enhanced version of the GNU Locate

SYNOPSIS

slocate [-qi] [-d ] [--database=]

slocate [-i] [-r ] [--regexp=]

slocate [-qv] [-o ] [--output=]

slocate [-e ] [-f ] <[-l ] [-c] <[-U ] [-u]>

slocate [-Vh] [--version] [--help]

DESCRIPTION


Secure Locate provides a secure way to index and quickly search for files on your system. It uses incremental encoding just like GNU locate to compress its database to make searching faster, but it will also store file permissions and ownership so that users will not see files they do not have access to.


This manual page documents the GNU version of slocate. slocate Enables system users to search entire filesystems without displaying unauthorized files.

OPTIONS

-u
Create slocate database starting at path /.
-U dir
Create slocate database starting at path dir.
-e
Exclude directories from the slocate database.
-f
Exclude files on specific file systems from the slocate database.
-c
Parse '/etc/updatedb.conf' when updating the slocate database.
-l
Security level. 0 turns security checks off. This will make searchs faster. 1 turns security checks on. This is the default.
-i
Does a case insensitive search.
-q
Quiet mode. Error messages are suppressed.
-n
Limit the amount of results shown to .
-r
--regexp= Search the database using a basic POSIX regular expression.
-o
--output= Specifies the database to create.
-d
--database= Specifies the path of databases to search in.
-h
--help Display this help.
-v
--verbose Verbose mode. Display files when creating database.
-V
--version Display version.

EXAMPLES 

locate project
Lists all files that contain the string "project". If that command does not work you will need to run the command:
slocate -u
This command builds the slocate database which will allow you to use the locate (slocate) command. It may take a few minutes to run.

SEE ALSO

locatedb(1L), find(5L), updatedb(1L), xargs(1L)


Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

')}if(z155>0){w('
'+ap[0]+at[4]+as[0]);adunit('','','about.com',ch,gs,336,155,'1','ps',4);w('
')}

Explore Linux

Must Reads
By Category

More from About.com

Browse All About.com

Linux

  1. Home
  2. Computing & Technology
  3. Linux
Add to:

©2009 About.com, a part of The New York Times Company.

All rights reserved.