/usr/bin/locate , maybe OT - but asking anyway
macportsusers-20171215 at billmail.scconsult.com
Thu Jun 20 15:15:32 UTC 2019
On 20 Jun 2019, at 8:56, Christoph Kukulies wrote:
> I’m wondering why the /usr/bin/locate command doesn’t find
> anything that’s located in ~/Documents, when ~/Documents is located
> on iCloud Drive.
> Trying to locate (even after a /usr/libexec/locate.updatedb) doesn’
> t look in iCloud Drive.
The locate.updatedb script is intended to run as the "nobody" user and
so only see parts of the system that are visible to all users. Some
versions of that script actively enforce that design by fixing ownership
of the locate DB and relaunching as nobody.
It's a privacy issue. Despite the evolution back towards computers being
one-user devices, MacOS is still a multi-user Unix derivative at heart
and 'locate' is part of that heritage. If you want to find a document
that you own in a directory that only you can access, the "mdfind"
utility (which uses Spotlight's DB) will do that.
bill at scconsult.com or billcole at apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
More information about the macports-users