Linux locate command
Linux locate command
Linux locate command to find qualified documents, he will go to save the file and directory names in the database and look in line with the conditions of the document or template style directory.
Normally we only need to enter locate your_file_name to find the specified file.
grammar
locate [-d ][--help][--version][范本样式...]
parameter:
- -d or --database = configuration database used by locate command. locate command default database resides in / var / lib / slocate directory, document named slocate.db, You can use this parameter to specify otherwise.
- --help online help.
- --version display version information.
Examples
Find passwd file, enter the following command:
locate passwd
Additional information
locate and find different: find is hard to find, locate only in / var / lib / slocate database to find.
locate faster than find faster, it does not really look, but check the database, the database file is generally in /var/lib/slocate/slocate.db, so look not locate real-time, but in order to update the database prevail, usually maintain their own system, you can also manually upgrade the database, the command is:
locate -u