Does the database created by updatedb expire after a certain amount of time?
0
votes
0
answers
135
views
A few days ago, when I ran
locate
to find some files in my home filesystem, it didn't return anything. It seemed to me that it had only indexed the files in the root filesystem but not the home filesystem. (Not sure where its configuration is.) So I ran updatedb
and then locate
found files in the home filesystem.
Now when I ran locate
again, it returned nothing. Has the database created by updatedb
expired after a certain amount of time?
Thanks.
-------------
Update:
I have been using NixOS.
I am replying to the requests in the comment:
> check for mlocate.db in /var/lib/mlocate/mlocate,
$ ls /var/lib/mlocate/mlocate
ls: cannot access '/var/lib/mlocate/mlocate': No such file or directory
$ ls /var/lib/mlocate/
ls: cannot access '/var/lib/mlocate/': No such file or directory
$ ls /var/lib/
alsa bluetooth cups dhclient docker lightdm lightdm-data logrotate.status machines misc NetworkManager NetworkManager-fortisslvpn nixos private systemd udisks2 vnstat
> post the content of your /etc/updatedb.conf
$ cat /etc/updatedb.conf
PRUNEFS="afs anon_inodefs auto autofs bdev binfmt binfmt_misc ceph cgroup cgroup2 cifs coda configfs cramfs cpuset curlftpfs debugfs devfs devpts devtmpfs ecryptfs eventpollfs exofs futexfs ftpfs fuse fusectl fusesmb fuse.ceph fuse.glusterfs fuse.gvfsd-fuse fuse.mfs fuse.rclone fuse.rozofs fuse.sshfs gfs gfs2 hostfs hugetlbfs inotifyfs iso9660 jffs2 lustre lustre_lite misc mfs 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 tracefs ubifs udev udf usbfs vboxsf vperfctrfs"
PRUNENAMES=""
PRUNEPATHS="/tmp /var/tmp /var/cache /var/lock /var/run /var/spool /nix/store /nix/var/log/nix"
PRUNE_BIND_MOUNTS="no"
> Check for whatever related entry in your crontab.
$ ls /var/spool/cron/crontabs
ls: cannot access '/var/spool/cron/crontabs': No such file or directory
$ ls /var/spool/cron/
ls: cannot access '/var/spool/cron/': No such file or directory
$ ls /var/spool/
cups
Asked by Tim
(106430 rep)
Sep 20, 2022, 08:33 PM
Last activity: Feb 18, 2023, 09:27 AM
Last activity: Feb 18, 2023, 09:27 AM