Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux command-- locate

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

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:~#

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report