Linux command-- locate
Although the find command search ability is strong, but for a large number of searches, find search will be much slower, especially every time from the entire file system search, when we can use the locate command to find, search is almost an instant thing!
Locate searches mainly through the file name database to determine the location of the file. It automatically establishes the file name database of the entire system. If you need to update the latest file name database, we can use the following command:
Root@VM-12-155-debian:~# updatedbroot@VM-12-155-debian:~#
The basic usage syntax is as follows:
The locate keyword / / keyword is mainly the file name or directory name root@VM-12-155-debian:~# locate passwd/etc/passwd/etc/passwd-/etc/cron.daily/passwd/etc/exim4/passwd.client/etc/pam.d/chpasswd/etc/pam.d/passwd/etc/security/opasswdroot@VM-12-155-debian:~# locate / etc/shad/etc/shadow/etc/shadow-/var/lib/docker/aufs/diff/f0ea6429bcad3d955456f12097b82ac4de51af9555aeb730d13aa8e54c57ebee/ Etc/shadowroot@VM-12-155-debian:~#