Locate command and shares

Bureaucromancer
Posts: 49
Joined: Fri Oct 12, 2012 7:32 pm

Locate command and shares

Postby Bureaucromancer » Thu Jun 27, 2013 12:19 am

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.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Locate command and shares

Postby bigfoot65 » Sun Jun 30, 2013 9:02 am

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Bureaucromancer
Posts: 49
Joined: Fri Oct 12, 2012 7:32 pm

Re: Locate command and shares

Postby Bureaucromancer » Sun Jun 30, 2013 11:50 am

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

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Locate command and shares

Postby bigfoot65 » Sun Jun 30, 2013 12:12 pm

Ah, that could be. I am sure this is one that will require more research.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Locate command and shares

Postby bigfoot65 » Sun Jun 30, 2013 12:25 pm

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 11 guests