Linux command--locate

Source: Internet
Author: User
Tags name database

Although the Find command search ability is strong, but for a large number of searches, find search is much slower, especially every time from the entire file system to search, then we can use the Locate command to find, the search is almost instantaneous things!

Locate mainly through the file name database to determine the location of files to search, he will automatically establish the entire system file name database, if you need to update the latest file name database, we can use the following command:

[Email protected]:~# updatedb[email protected]:~#


The basic usage syntax is as follows:

Locate keyword//keyword is primarily a file name or directory name
[Email protected]:~# Locate PASSWD/ETC/PASSWD/ETC/PASSWD-/ETC/CRON.DAILY/PASSWD/ETC/EXIM4/PASSWD.CLIENT/ETC/PAM.D /chpasswd/etc/pam.d/passwd/etc/security/opasswd
[Email protected]:~# locate/etc/shad/etc/shadow/etc/shadow-/var/lib/docker/aufs/diff/ F0ea6429bcad3d955456f12097b82ac4de51af9555aeb730d13aa8e54c57ebee/etc/shadow[email protected]:~#


This article is from the "eth10" blog, make sure to keep this source http://eth10.blog.51cto.com/13143704/1956726

Linux command--locate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.