Linuxシステムのどの部分がインデックスを検索または検索しませんか? [コピー]

Linuxシステムのどの部分がインデックスを検索または検索しませんか? [コピー]

周りを見回しましたが、man locateこの質問に対する答えが見つかりませんでした。

このupdatedbコマンドは/下のすべての項目のインデックスを生成するようですが、私の実験によると/media/mike/W10 D drive/nonsense_file

マウントされたメディアボリューム/場所を除外するとしますか?これはどこかに文書化されていますか?これらの場所の一部を選択的に含める方法はありますか?

ベストアンサー1

設定はファイルにあります/etc/updatedb.conf。次のように見えます。

# /etc/updatedb.conf: config file for mlocate

# This file sets variables that are used by updatedb.
# For more info, see the updatedb.conf(5) manpage.

# Filesystems that are pruned from updatedb database
PRUNEFS="9p afs anon_inodefs auto autofs bdev binfmt binfmt_misc ceph fuse.ceph cgroup cifs coda configfs cramfs cpuset debugfs devfs devpts devtmps ecryptfs eventpollfs exofs futexfs ftpfs fuse fusectl gfs gfs2 gpfs hostfs hugetlbfs inotifyfs iso9660 jffs2 lustre misc mqueue ncpfs nfs NFS nfs4 nfsd nnpfs ocfs ocfs2 pipefs proc ramfs rpc_pipefs securityfs selinuxfs sfs shfs smbfs sockfs spufs sshfs subfs supermount sysfs tmpfs ubifs udf usbfs vboxsf vperfctrfs"

# Paths which are pruned from updatedb database
PRUNEPATHS="/tmp /var/tmp /var/cache /var/lock /var/run /var/spool /mnt /cdrom /usr/tmp /proc /media /sys /.snapshots /var/run/media"

# Folder names that are pruned from updatedb database
PRUNENAMES = ".git .hg .svn .bzr .arch-ids {arch} CVS"

# Skip bind mounts.
# DISABLED for bnc#994663 and to avoid btrfs subvolume issues
PRUNE_BIND_MOUNTS="no"

説明したように、ファイルシステムの種類、パス/フォルダ、名前付きフォルダを除外できます。

よりマニュアルページもっと学ぶ。

おすすめ記事