Linux之locate命令详解
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
·
文件搜索命令:locate(只能搜文件名)
用法
locate 文件名
在后台数据库中安文件名搜索,搜索速度比find更快,但对于刚建立的文件,使用该命令进行查找将会搜索不到所创建的文件,例如:
如果想使刚创建的文件被locate命令搜索到,可以使用updatedb命令,更新mlocate数据库,之后在使用locate命令才能搜索到,否则要等到第二天才能搜索到该文件,该后台数据库默认一天更新一次
数据库所在位置: /var/lib/mlocate
locate默认不搜索包含以下信息的文件:
若是首次使用locate命令发现出现一下问题:
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
只需要使用updatedb命令进行更新一下,就不会出现上述问题了
A beautiful web dashboard for Linux
最近提交(Master分支:4 个月前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)