我想在我的 Ubuntu 服务器上使用mlocate,但只能索引某些目录(例如/home和/data,但不是 下的所有内容/)。但是,mlocate 的标准配置则相反;您指定要删除的路径(使用PRUNE_PATHS)。
有没有什么简单的方法可以实现这一点,或者任何类似的实用程序可以满足我的要求?(注意:它应该维护一个像 那样的索引mlocate,所以find是不可接受的,例如)谢谢。
$ ps -elf | grep
...
0 D nobody 27320 27319 2 90 10 - 353471 sleep_ 07:54 ? 00:02:19 /usr/bin/find / -ignore_readdir_race ( -fstype NFS -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype lustre_lite …Run Code Online (Sandbox Code Playgroud)