zoukankan      html  css  js  c++  java
  • 关于locate这个NB命令我不得不深入的学习

    先看看locate的安装包和生成的文件:

    [root@NB mlocate]# which locate
    /usr/bin/locate
    [root@NB mlocate]# rpm -qf /usr/bin/locate 
    mlocate-0.22.2-6.el6.x86_64
    [root@NB mlocate]# rpm -ql mlocate
    /etc/cron.daily/mlocate.cron
    /etc/updatedb.conf
    /usr/bin/locate
    /usr/bin/updatedb
    /usr/share/doc/mlocate-0.22.2
    /usr/share/doc/mlocate-0.22.2/AUTHORS
    /usr/share/doc/mlocate-0.22.2/COPYING
    /usr/share/doc/mlocate-0.22.2/NEWS
    /usr/share/doc/mlocate-0.22.2/README
    /usr/share/locale/bg/LC_MESSAGES/mlocate.mo
    /usr/share/locale/ca/LC_MESSAGES/mlocate.mo
    /usr/share/locale/cs/LC_MESSAGES/mlocate.mo
    /usr/share/locale/da/LC_MESSAGES/mlocate.mo
    /usr/share/locale/de/LC_MESSAGES/mlocate.mo
    /usr/share/locale/es/LC_MESSAGES/mlocate.mo
    /usr/share/locale/fr/LC_MESSAGES/mlocate.mo
    /usr/share/locale/hu/LC_MESSAGES/mlocate.mo
    /usr/share/locale/it/LC_MESSAGES/mlocate.mo
    /usr/share/locale/ja/LC_MESSAGES/mlocate.mo
    /usr/share/locale/ms/LC_MESSAGES/mlocate.mo
    /usr/share/locale/nl/LC_MESSAGES/mlocate.mo
    /usr/share/locale/pl/LC_MESSAGES/mlocate.mo
    /usr/share/locale/pt/LC_MESSAGES/mlocate.mo
    /usr/share/locale/pt_BR/LC_MESSAGES/mlocate.mo
    /usr/share/locale/sr/LC_MESSAGES/mlocate.mo
    /usr/share/locale/sr@latin/LC_MESSAGES/mlocate.mo
    /usr/share/locale/sv/LC_MESSAGES/mlocate.mo
    /usr/share/locale/zh_CN/LC_MESSAGES/mlocate.mo
    /usr/share/man/man1/locate.1.gz
    /usr/share/man/man5/mlocate.db.5.gz
    /usr/share/man/man5/updatedb.conf.5.gz
    /usr/share/man/man8/updatedb.8.gz
    /var/lib/mlocate
    /var/lib/mlocate/mlocate.db

    下面看一下配置文件的内容:

    [root@NB mlocate]# cat /etc/updatedb.conf 
    PRUNE_BIND_MOUNTS = "yes"
    PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset debugfs devpts ecryptfs exofs fuse fusectl gfs gfs2 gpfs hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs sockfs sysfs tmpfs ubifs udf usbfs"
    PRUNENAMES = ".git .hg .svn"
    PRUNEPATHS = "/afs /media /net /sfs /tmp /udev /var/cache/ccache /var/spool/cups /var/spool/squid /var/tmp"#可见这行列出的目录下的文件都不会被存在mlcocated.db中去!!!
  • 相关阅读:
    实战 Windows下搭建Objectivec的编译环境
    C# 协变和逆变 精解(直观明了,简单易懂)
    求两个字符串的最大公共串
    [C++][数据结构]队列(queue)的实现
    转换一个矩阵(2维数组)为HTML Table
    [C++][数据结构][算法]单链式结构的深拷贝
    LaTeX 中的特殊符号
    [C++11][数据结构]自己的双链表实现
    现代诗十则
    [C++11][算法][穷举]输出背包问题的所有可满足解
  • 原文地址:https://www.cnblogs.com/bass6/p/6285760.html
Copyright © 2011-2022 走看看