Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible to merge slocate databases built on several machines in a local network? Typically, updatedb omits network-mounted directories when building/updating the database, otherwise it could go forever. Still, it might be useful to have a tool to construct a merged database built up from two or more local slocate databases and be able to search files located anywhere in the LAN, just in a single pass, without repeating the search on every machine.
i wouldn't look to merge databases, but use each database in turn... you could easily store the databases on a common NFS location and the cycle through them with a simple bash loop. that also let's you add in extra details about what machine it is on, which isn't held within the database. alternatively you could leave all databases untouched and use a framwork of ssh to connection into each machine and run the searches remotely and just give you back the data. this would X number of machines search a singel database, rather than a single machine search X number of databases, so will be faster by a factor of X.
Last edited by acid_kewpie; 08-28-2007 at 06:11 AM.
I arranged copying (in /etc/crontab) individual slocate.db files from several machines to one location on the main server, with appropriate filename change.
When I, however, try to search the databases being logged to the main server, using "slocate -d /path/machine_name.db pattern" it shows nothing. Only when I get superuser privileges, it shows the files matching the pattern.
It seems that "slocate" run by an ordinary user checks for existence of each file matched. Surely it does not find the file on another machine.
Can this be avoided? Or the only way is to make multiple "rsh" or "ssh" calls to every machine which in turn requires the access to those machines without using password.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.