zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    zookeeper基本知识
    kafka常见问题
    模板设计模式
    Zookeeper的未授权访问漏洞解决
    Kubernetes准入控制器PodNodeSelector、PodTolerationRestriction
    Kubernetes 基于 Namespace 的物理队列实现,即Namespace下的Pod和Node的强绑定
    银行卡LUHM校验算法(C++)(转)
    银行卡LUHM校验算法(C++)(转)
    Unity导弹自动追踪算法(转)
    基于MicroChip ATmega4808的阿里云IOT连接开发套件方案(转)
  • 原文地址:https://www.cnblogs.com/wzlbigdata/p/8401029.html
Copyright © 2011-2022 走看看