• 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

  • 相关阅读:
    Knative Serving 进阶: Knative Serving SDK 开发实践
    从求生存到修体系,我在阿里找到了技术人的成长模式
    K8s 学习者绝对不能错过的最全知识图谱(内含 56个知识点链接)
    P1197 [JSOI2008]星球大战
    P1311 选择客栈
    P2822 组合数问题
    贪心 加工生产调度
    P3375 【模板】KMP字符串匹配
    P1025 数的划分
    P1019 单词接龙
  • 原文地址:https://www.cnblogs.com/wzlbigdata/p/8401029.html
Copyright © 2020-2023  润新知