Page 1 of 1

Locate command and shares

Posted: Thu Jun 27, 2013 12:19 am
by Bureaucromancer
So in the process of trying to automate some file management stuff I've found that the locate command doesn't seem to have any index of locally mounted shares (everything does show up in both the LZs and in the gh directories, just not the shares). This is probably more a question of how samba mounts works in relation to the locate database updates than a greyhole thing per se, but does anyone have ideas as to options (other than just using find) or alternatives? Ideally I'd just like to get the shares indexed, but I don't know much about the workings of locate or how different from a normal directory a samba mount actually is for these purposes.

Re: Locate command and shares

Posted: Sun Jun 30, 2013 9:02 am
by bigfoot65
That would make sense that it finds files in both. If you only want to search files in the shares, then restrict your search to /var/hda/files and exclude the drives folder.

Re: Locate command and shares

Posted: Sun Jun 30, 2013 11:50 am
by Bureaucromancer
I would expect it to find files in both, but it doesn't . Only /var/hda/files is indexed at all. Locate seems to think /mnt/samba is empty. My guess is that because of samba being used the indexing daemon thinks they are network mounts and skips them.

[ Post made via iPhone ] Image

Re: Locate command and shares

Posted: Sun Jun 30, 2013 12:12 pm
by bigfoot65
Ah, that could be. I am sure this is one that will require more research.

Re: Locate command and shares

Posted: Sun Jun 30, 2013 12:25 pm
by bigfoot65
What about using mlocate. According to what I have read, you can run it as a cron job daily to keep the file index updated.

It's supposed to be an advanced version of locate.
http://www.thegeekstuff.com/2012/03/loc ... -examples/

EDIT: Been testing and this does not seem to help.