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 [文件名],不区分大小写进行 ...
随机推荐
- 【转】小白级的CocoaPods安装和使用教程
原文网址:http://www.jianshu.com/p/e2f65848dddc 百度有很多CocoaPods的安装教程.第一次看的时候,确实有点摸不透的感觉.经过思考,一步一步来实践,前后花了三 ...
- 36.QT地图
widget.h #ifndef MAPWIDGET_H #define MAPWIDGET_H #include <QGraphicsView> #include <QLabel& ...
- Extjs 常见错误
http://blog.csdn.net/lc448986375/article/details/8082014
- 未在本地计算机上注册"Microsoft.Jet.OLEDB.4.0"提供程序的解决方法
以下代码,打断点出现报错:未在本地计算机上注册“Microsoft.Jet.OLEDB.4.0”提供程序 DataSet ds=new DataSet(); try { string strCon = ...
- Android ImageView 替换图片
网上找了半天,找到的都是错的,都不是我想要的效果.我想要的是点击一个图片后,图片被替换. 通过一下方法可以实现:“v”是ImageView对象,“image_name”是替换后的图片资源 ((Imag ...
- java 读写分离
源码地址:http://git.oschina.net/xiaochangwei 先回答下 1.为啥要读写分离? 大家都知道最初开始,一个项目对应一个数据库,基本是一对一的,但是由于后来用户及数据还有 ...
- oc与swift比较
swift试是用语言层面的雕虫小技和oc的机制大道进行pk. 从整体上来说,oc是一个更加优秀的语言.
- Unity "Build failed : Asset is marked as don't save " 解决方案
编译到Android时失败,是字体的原因: -- -- 摘自官方论坛排第二但点赞第一的回答. http://answers.unity3d.com/questions/363963/build-fai ...
- Mysql-slowlog
MySQL慢查询日志是MySQL提供的一种日志记录,用来记录执行时长超过指定时长的查询语句,具体指运行时间超过 long_query_time 值的 SQL 语句,则会被记录到慢查询日志中. long ...
- BZOJ 2119 股市的预测 (后缀数组+RMQ)
题目大意:求一个字符串中形如$ABA$的串的数量,其中$B$的长度是给定的 有点像[NOI2016]优秀的拆分这道题 先对序列打差分,然后离散,再正反跑$SA$,跑出$st$表 进入正题 $ABA$串 ...