You are Here:
Linux Lite 6.4 RC1 Released - See the Release Announcements Forum section



locate doesn´t seem to include home directory

Author (Read 795 times)

0 Members and 5 Guests are viewing this topic.

Re: locate doesn´t seem to include home directory
« Reply #10 on: January 26, 2023, 09:55:46 AM »
 

Rosika

  • New to Forums
  • *
  • 28
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 6.0 64bit
Hi stevef,  :)

thanks for the link.
In fact I stumbled over the same article yesterday but didn´t bother referring to it as it doesn´t seem to apply with my case.

To answer your question:

No, the files system for my LL installation is ext3 for root as well as for home.
So I think changing the respective line to
Code: [Select]
PRUNE_BIND_MOUNTS = "no"wouldn´t be of help here.  :023:

Curious though: the locate command does find files elsewhere. So generally it works alright. It´s just the home partition which seems to be excluded.

Thanks anyway for your time and help.

Many greetings
Rosika  :wave
 

Re: locate doesn´t seem to include home directory
« Reply #9 on: January 26, 2023, 09:42:30 AM »
 

stevef

  • Global Moderator
  • I come here a lot
  • *****
  • 434
    Posts
  • Reputation: 82
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: Intel Core i5-4460

  • MEMORY: 16Gb

  • Kernel: 5.x
Rosika,

I'm not helping much.  On the systems I have, mlocate (LL5) and plocate (LL6) both find files in the home directory (and any sub-directories) - subject to them being cached in the database.  Is your disk btrfs ?

I found this which suggest some issues with mlocate and btrfs related to home directory

https://ask.fedoraproject.org/t/the-locate-command-doesnt-show-files-from-home/19470
 

Re: locate doesn´t seem to include home directory
« Reply #8 on: January 26, 2023, 08:43:23 AM »
 

Rosika

  • New to Forums
  • *
  • 28
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 6.0 64bit
Hi stevef,  :)

thanks for your help.

Quote
You may have plocate in LL6

Yes, indeed LL 6.2 came with both installed:

Code: [Select]
dglob plocate; and dglob mlocate
plocate:amd64
mlocate:all

The output of the command you provided is:

Code: [Select]
ls -al /var/lib/plocate/
total 7000
drwxr-xr-x  2 root root       4096 Jan 25 16:20 .
drwxr-xr-x 80 root root       4096 Jan 19 17:41 ..
-rw-r--r--  1 root root        183 Feb 17  2022 CACHEDIR.TAG
-rw-r-----  1 root plocate 7142630 Jan 25 16:20 plocate.db

So date and time of plocate.db is:

Code: [Select]
Jan 25 16:20Well, I tried the command just yesterday...

Thanks again and many greetings
Rosika :wave
 

Re: locate doesn´t seem to include home directory
« Reply #7 on: January 25, 2023, 01:01:45 PM »
 

stevef

  • Global Moderator
  • I come here a lot
  • *****
  • 434
    Posts
  • Reputation: 82
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: Intel Core i5-4460

  • MEMORY: 16Gb

  • Kernel: 5.x
You may have plocate in LL6.  What's date and time of the file plocate.db at

Code: [Select]
ls -al /var/lib/plocate/
 

Re: locate doesn´t seem to include home directory
« Reply #6 on: January 25, 2023, 11:46:24 AM »
 

Rosika

  • New to Forums
  • *
  • 28
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 6.0 64bit
I dont´t know if it helps anything at all. I´ll give you the contents of updatedb.conf



Code: [Select]
cat /etc/updatedb.conf
PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph /home/.ecryptfs
 /var/lib/schroot"
PRUNEFS="NFS afs autofs binfmt_misc ceph cgroup cgroup2 cifs coda configfs curlftpfs
debugfs devfs devpts devtmpfs ecryptfs ftpfs fuse.ceph fuse.cryfs fuse.encfs
fuse.glusterfs fuse.gvfsd-fuse fuse.mfs fuse.rclone fuse.rozofs fuse.sshfs fusectl
fusesmb hugetlbfs iso9660 lustre lustre_lite mfs mqueue ncpfs nfs nfs4 ocfs ocfs2 proc
pstore rpc_pipefs securityfs shfs smbfs sysfs tmpfs tracefs udev udf usbfs"
« Last Edit: January 26, 2023, 08:36:26 AM by Rosika »
 

Re: locate doesn´t seem to include home directory
« Reply #5 on: January 25, 2023, 11:29:52 AM »
 

Rosika

  • New to Forums
  • *
  • 28
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 6.0 64bit
Hi stevef:

So sorry. Can´t even do that:

Code: [Select]
locate --statistics
locate: unrecognized option '--statistics'

« Last Edit: January 26, 2023, 08:33:29 AM by Rosika »
 

Re: locate doesn´t seem to include home directory
« Reply #4 on: January 25, 2023, 11:18:12 AM »
 

stevef

  • Global Moderator
  • I come here a lot
  • *****
  • 434
    Posts
  • Reputation: 82
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: Intel Core i5-4460

  • MEMORY: 16Gb

  • Kernel: 5.x
OK.  For me, locate does not exclude the home directory on my system, but can't find anything not in the database.

Try

Code: [Select]
locate --statistics
This should report your database location. Then check the date time on the file it is using.
 

Re: locate doesn´t seem to include home directory
« Reply #3 on: January 25, 2023, 11:06:52 AM »
 

Rosika

  • New to Forums
  • *
  • 28
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 6.0 64bit
Hi stevef:

Thanks for your reply.

Quote
Does it report older files in your home directory by any chance ?

No. locate doesn´t seem to find anything in my home directory.
I still punched in your command but just got this:

Code: [Select]
ls -al /var/lib/mlocate/
ls: cannot access '/var/lib/mlocate/': No such file or directory

That´s weird...  :029:

Many greetings from Rosika  :wave
 

Re: locate doesn´t seem to include home directory
« Reply #2 on: January 25, 2023, 10:53:30 AM »
 

stevef

  • Global Moderator
  • I come here a lot
  • *****
  • 434
    Posts
  • Reputation: 82
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: Intel Core i5-4460

  • MEMORY: 16Gb

  • Kernel: 5.x
Does it report older files in your home directory by any chance ?
If so check the date/time on the file in

Code: [Select]
ls -al /var/lib/mlocate/
 

locate doesn´t seem to include home directory
« Reply #1 on: January 25, 2023, 09:27:58 AM »
 

Rosika

  • New to Forums
  • *
  • 28
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 6.0 64bit
Hi all,  :)

I just stumbled over some curious behaviour. The "locate" command doesn´t seem to include my home directory.

On my desktop I created a text-file "prov.txt", then ran "sudo updatedb" but
"locate prov.txt" didn´t return any results.  :023:

The "find" command however doesn´t have any difficulties finding it.
Is it possible that the home directory is excluded by "locate"?

Many thanks in advance and many greetings.

Rosika  :wave
 

 

-->
X Close Ad

Linux Lite 6.4 RC1 Released - See the Release Announcements Forum section