From FreeBSDwiki
Jump to: navigation, search

locate pattern

The locate program searches a database for all pathnames which match the specified pattern. The database is automaticly recomputed periodically weekly and contains the pathnames of all files which are publicly accessible. IE: everything in the [path].

The locate program may fail to list some files that are present, or may list files that have been removed from the system. This is because locate only reports files that are present in the database, which is only regenerated once a week by the /etc/periodic/weekly/310.locate script.

If logged in as root
cd /

will reveal all filenames on your system to all login users.
In some user environments this is a security risk.

Personal tools