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中去!!!
  • 相关阅读:
    数据结构栈的链式存储(c语言描述)
    Glide相关api
    mac安装WireShark2.0新手教程
    android的布局 (如何实现空心圆效果的布局)
    Android如何设置只有边框背景透明的背景呢?
    failed parsing overlays.
    SVN 报错问题
    关于Fragment的点击切换数据滞留问题
    数据结构(严蔚敏版)思维导图
    【LeetCode】23.合并K个排序链表
  • 原文地址:https://www.cnblogs.com/bass6/p/6285760.html
Copyright © 2011-2022 走看看