Originally Posted by segmentation_fault
Take a look at updatedb.conf (if you haven't already). Could the directory containing the file be in PRUNEPATHS list?
I haven't studied slocate that much, but I think I've read that it locates files based on user access. Maybe your user doesn't have read permission for that file?
bash-3.1$ cat /etc/updatedb.conf
PRUNEFS="devpts NFS nfs afs proc smbfs autofs iso9660 udf"
PRUNEPATHS="/dev /proc /sys /tmp /usr/tmp /var/tmp /afs /net"
From here, I infer the strings PRUNEFS and PRUNEPATHS are variable names. However slocate and updatedb manuals call them options [?!]. Assuming they are environment variables, they are unset or empty, as the set command reveals.
And definitely, in this case, it is not a matter of access rights because, as you can see in post #1, the second invocation of slocate brings 'foo' out.
Originally Posted by Tinkster
Or PRUNEFS, for that matter ... for all we know it (foo) might be
an external HDD using NTFS ...
Again, never mind the drive location or file system: second invocation works fine. But, in case my logic is faulty, here are some data (NOTE: usb-in-a-nutshell.pdf is here old foo in post #1):
(a) Only one user account in the system besides root: semoi. Slocate run as, and manual invocation of updatedb made as root (BUT WHO IS the user executing the script /etc/cron.daily/slocate?).
drwxr-xr-x 39 semoi users 16384 /xp
drwxr-xr-x 3 semoi users 16384 /xp/DIGITALES III/
-rwxr-xr-x 1 semoi users 179330 /xp/DIGITALES III/usb-in-a-nutshell.pdf
[..............] (brackets are mine).
/dev/hda1 on /xp type vfat (rw,uid=1000,gid=100)
/dev/hdb2 on /sma type vfat (rw)
It's been a long time since I touched /etc/fstab the last time.
(c) After last automatic execution of update (cron.daily) but before manual execution (see post #1), everything in /sma got located by slocate but, as to /xp, only files in the first two levels of the /xp tree had their names printed. E.g.,
$ locate DIGITA
# locate nutshell
whereas after manually running slocate:
bash-3.1# locate nutshell
As I pointed out before, usb-in-a-nutshell.pdf has been in /xp/DIGITALES III/ from time immemorial.
Regards and thanks for the feedback.