Linux命令locate
centos安装locate命令
centos6.3刚初始化安装完毕,有个配置文件不知道存在什么地方,想用locate命令来查找下,发现系统提示,找不到该命令。以前经常用的命令为什么找不到了呢???原来现在的6.3的已经将原来的locate命令因为效率低下的问题,已经弃用了。用现在最新的mlocate中的locate来代替原来的locate命令了。
所以大家想继续使用locate命令的话,就先安装一下吧。
|
1
2
|
# yum install mlocate# updatedb |
运行完毕上面的两条命令之后,就可以使用自己久违的locate命令了。
附locate的参数.
Usage: locate [OPTION]… [PATTERN]…
Search for entries in a mlocate database.-b, –basename match only the base name of path names
-c, –count only print number of found entries
-d, –database DBPATH use DBPATH instead of default database (which is
/var/lib/mlocate/mlocate.db)
-e, –existing only print entries for currently existing files
-L, –follow follow trailing symbolic links when checking file
existence (default)
-h, –help print this help
-i, –ignore-case ignore case distinctions when matching patterns
-l, –limit, -n LIMIT limit output (or counting) to LIMIT entries
-m, –mmap ignored, for backward compatibility
-P, –nofollow, -H don’t follow trailing symbolic links when checking file
existence
-0, –null separate entries with NUL on output
-S, –statistics don’t search for entries, print statistics about each
used database
-q, –quiet report no error messages about reading databases
-r, –regexp REGEXP search for basic regexp REGEXP instead of patterns
–regex patterns are extended regexps
-s, –stdio ignored, for backward compatibility
-V, –version print version information
-w, –wholename match whole path name (default)原文:http://www.yuweixian.com/linux/centos-install-locate.html
Linux命令locate的更多相关文章
- 每天一个linux命令--locate
linux下,不知道自己安装的程序放在哪里了,可以使用locate命令进行查找. [hongye@dev107 ~]$ locate activemq.xml /home/hongye/hongyeC ...
- linux命令:locate
1.命令简介 locate(locate) 命令用来查找文件或目录. locate命令要比find -name快得多,原因在于它不搜索具体目录,而是搜索一个数据库/var/lib/ml ...
- Linux 命令locate
原文:https://blog.csdn.net/liang19890820/article/details/53285624 简述 locate 可以很快速的搜寻档案系统内是否有指定的档案.其方法是 ...
- linux命令总结之查找命令find、locate、whereis、which、type
我们经常需要在系统中查找一个文件,那么在Linux系统中我们如何准确高效的确定一个文件在系统中的具体位置呢?一下我总结了在linux系统中用于查找文件的几个命令. 1.find命令 find是最常用也 ...
- Linux经常使用命令002之搜索命令locate、whereis、which、find、grep
Linux经常使用命令002之搜索命令locate.whereis.which.find.grep -20150811 经常使用搜索命令 -------文件搜索命令---------- -->l ...
- 每天一个Linux命令:locate(19)
locate locate命令 让使用者可以很快速的搜寻档案系统内是否有指定的档案.其方法是先建立一个包括系统内所有档案名称及路径的数据库,之后当寻找时就只需查询这个数据库,而不必实际深入档案系统之中 ...
- Linux 命令中 which、whereis、locate 命令的用法
which 命令 which 命令的作用是,在 PATH 变量指定的路径中搜索可执行文件的所在位置.它一般用来确认系统中是否安装了指定的软件. (1)命令格式 which 可执行文件名称 wherei ...
- Linux系类(8) - 文件搜索命令locate
文件搜索命令locate 命令格式 locate [文件名] 在后台数据库中按文件名搜索,搜索速度更快,而find.which是遍历所有目录去查找:后台数据库在/var/lib/mlocate (保存 ...
- Linux文件搜索命令locate、which、grep详解
命令locate详解 命令locate,其基本功能是在文件资料库中可以快速的搜索系统文件,占用系统资源很少,例如:locate my.cnf 还可以使用locate -i [文件名],不区分大小写进行 ...
随机推荐
- crawler4j图片爬虫
该实例主要演示下如何爬取指定网站的图片: 代码中有详细注释: 首先写一个ImageCrawler类: package com.demo.imageCrawler4j; import java.io.F ...
- android编译ffmpeg+x264
下载最新版的x264ftp://ftp.videolan.org/pub/videolan/x264/snapshots/1.解压到指定的目录2.切换当前目录为该目录3.创建一个shell脚本buil ...
- 查看md文件
使用命令将md文件转为html,在浏览器中演示 通过npm安装i5ting_toc 安装好node之后,可以直接使用npm.Windows+R打开运行框,输入cmd,打开命令窗口.连网的情况下,输入如 ...
- 「JavaSE 重新出发」05.01 继承
继承 一个对象变量可以指示多种实际类型的现象被称为多态(polymorphism). 在运行时能够自动地选择调用哪个方法的现象称为动态绑定(dynamic binding). 如果是private方法 ...
- JS对以对象组成的数组去重
这是从https://segmentfault.com/q/1010000006954351参考的,达到了我要去重的功能!!! var hash = {};//arr是要去重的对象数组 arr = a ...
- Iterator与Asyc/Await的实现
https://wanago.io/2018/04/23/demystifying-generators-implementing-async-await/
- Wepy--小程序自定义底部tabBar
PS后续: 说来惭愧, 没想到这篇文章浏览的人有点多. 说实话写的挺乱的. 并且自定义tabbar还有闪屏的问题. 因为有好几位道友都问了这个问题, 其中一位因为项目很急,所以就研究了一下(也是借鉴 ...
- ElasticSearch启动报错,bootstrap checks failed
修改elasticsearch.yml配置文件,允许外网访问. vim config/elasticsearch.yml# 增加 network.host: 0.0.0.0 启动失败,检查没有通过,报 ...
- Vue2+Webpack+ES6 兼容低版本浏览器(IE9)解决方案
Vue2+Webpack+ES6 兼容低版本浏览器(IE9)解决方案 解决方式:安装 "babel-polyfill" 即可. 命令:npm install --save-dev ...
- vuex中mutations与actions的区别
要执行vuex中的函数,有两种方法: 1.commit,例如this.$store.commit("GETMODULESELECTLIST"); //mutations中的方法 2 ...