On Sun, 24 Nov 2024 01:14:30 -0600, "David C. Rankin" <drankinatty@gmail.com> wrote:
I don't have to search for squirreled away files too often, but when I do, I rely on plocate (mlocate successor). However, tonight I was surprised it had not indexed by Readme-doxygen.txt and I can't figure out why.
The file I wanted to find has been there since Jan 15:
$ l /home/david/doc/linux/doxygen/Readme-doxygen.txt -rw-r--r-- 1 david david 5067 Jan 15 2024 /home/david/doc/linux/doxygen/Readme-doxygen.txt
My install has 3 partitons /boot, swap and / and /home is part of / and is mounted:
/dev/sda3 / ext4 rw,relatime 0 0
My /etc/updatedb.conf does not exclude /home or ext4 filesystems, e.g.
$ noc /etc/updatedb.conf 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" PRUNEPATHS="/tmp /var/tmp /var/cache /var/lock /var/run /var/spool /mnt /cdrom /usr/tmp /proc /media /sys /.snapshots /var/run/media" PRUNENAMES = ".git .hg .svn .bzr .arch-ids {arch} CVS" PRUNE_BIND_MOUNTS="no"
$ grep -Ev '^(#|$)' /etc/updatedb.conf |grep -Ewc 'btrfs|xfs|ext4|home' 0
My plocate-updatedb.timer just ran less than an hour ago:
$ scs plocate-updatedb ○ plocate-updatedb.service - Update the locate database Loaded: loaded (/usr/lib/systemd/system/plocate-updatedb.service; static5:185m) Active: inactive (dead) since Sun 2024-11-24 00:33:56 CST; 14min ago Invocation: 633dc34e995a4a658e4d66f1f61a0622 TriggeredBy: ● plocate-updatedb.timer Docs: man:updatedb Process: 158324 ExecStart=/bin/sh -c chown -R ${RUN_UPDATEDB_AS}:root /var/lib/plocate && su --shell=/bin/sh ${RUN_UPDATEDB_AS} -c 'umask 0022; /usr/sbin/updatedb' (code=exited, status=0/SUCCESS) Main PID: 158324 (code=exited, status=0/SUCCESS) CPU: 53ms
Nov 24 00:33:54 wizard systemd[1]: Starting Update the locate database... Nov 24 00:33:54 wizard su[158324]: (to nobody) root on none Nov 24 00:33:54 wizard su[158324]: pam_systemd(su:session): New sd-bus connection (system-bus-pam-systemd-158324) opened. Nov 24 00:33:54 wizard su[158324]: pam_unix(su:session): session opened for user nobody(uid=65534) by (uid=0) Nov 24 00:33:56 wizard systemd[1]: plocate-updatedb.service: Deactivated successfully. Nov 24 00:33:56 wizard systemd[1]: Finished Update the locate database.
$ systemctl status plocate-updatedb ○ plocate-updatedb.service - Update the locate database Loaded: loaded (/usr/lib/systemd/system/plocate-updatedb.service; static) Active: inactive (dead) since Tue 2024-11-26 01:43:58 PST; 13h ago Invocation: 77f1a21411a1411d8d66b4d15b3fd7b7 TriggeredBy: ● plocate-updatedb.timer Docs: man:updatedb Process: 125750 ExecStart=/bin/sh -c chown -R ${RUN_UPDATEDB_AS}:root /var/lib/plocate && su --shell=/bin/sh ${RUN_UPDATEDB_AS} -c 'umask 0022; /usr/sbin/updatedb' (code=exited, status=0/SUCCESS) Main PID: 125750 (code=exited, status=0/SUCCESS) CPU: 1.877s Nov 26 01:43:56 poppies systemd[1]: Starting Update the locate database... Nov 26 01:43:56 poppies su[125750]: (to root) root on none Nov 26 01:43:56 poppies su[125750]: pam_unix(su:session): session opened for user root(uid=0) by (uid=0) Nov 26 01:43:56 poppies su[125750]: pam_kwallet5(su:session): pam_kwallet5: pam_sm_open_session Nov 26 01:43:56 poppies su[125750]: pam_kwallet5(su:session): pam_kwallet5: not a graphical session, skipping. Use force_run parameter to ignore this. Nov 26 01:43:58 poppies su[125750]: pam_unix(su:session): session closed for user root Nov 26 01:43:58 poppies su[125750]: pam_kwallet5(su:session): pam_kwallet5: pam_sm_close_session Nov 26 01:43:58 poppies systemd[1]: plocate-updatedb.service: Deactivated successfully. Nov 26 01:43:58 poppies systemd[1]: Finished Update the locate database. Nov 26 01:43:58 poppies systemd[1]: plocate-updatedb.service: Consumed 1.877s CPU time. I don't see a significant difference from yours. Both updatedbs ran successfully as root.
'locate' is properly linked to 'plocate':
$ l /usr/bin/locate lrwxrwxrwx 1 root root 7 Jun 12 10:04 /usr/bin/locate -> plocate
Yet running 'locate Readme' or 'locate doxygen' does not turn up my file. Why is this? What magic am I missing?
Is that unique to that file, or are none of your files in $HOME found? $ locate -c ~ 168104 $ find ~ |wc -l 168229 -- Robert Webb