[OS X TeX] How to make locate/spotlight search ~/Library/texmf

Michael Sharpe msharpe at ucsd.edu
Tue Aug 10 12:45:06 EDT 2010

On Aug 10, 2010, at 9:22 AM, Alan Munn wrote:

> Hi,  I can use the locate command in a Terminal to quickly find files in /usr/local/texlive.  However, it doesn't find files in ~/Library/texmf.  How do I make it do that?
> Secondly, what's the relationship between the Spotlight search (via Command-space) and the locate search database?  They clearly don't find the same things, since /usr/local files never show up in the Command-Space searches.  Is there a way to make them match?
> Thanks
> Alan

I don't think it is possible to force the locate database to include personal areas. To do a Spotlight search which does find stuff in usr/local,  you can use mdfind with the DisplayName option, as in

mdfind 'kMDItemDisplayName == "testfont.tex*"cd'

There are peculiarities. It will find things like subject lines of emails and cached web pages that you don't want, so you really need to send the search results through grep. Finding .pfb files is also problematic, as their DisplayName attribute is frequently, but not always, empty. 


More information about the MacOSX-TeX mailing list