Search for a file

Ryan Schmidt ryandesign at
Tue Nov 17 14:42:49 PST 2009

On Nov 17, 2009, at 15:57, Panagiotis Atmatzidis wrote:

> On 17 Νοε 2009, at 3:15 μ.μ., Panayotis Katsaloulis wrote:
>> I would like to find a specific file in the ports distribution, when I don't already know the name of the package.
>> In other words, I want to find in which package(s) a specific file exists.
>> For example, in order to use docbook2html command, I  don't know which package to install.
>> In the old days of debian, I used to have apt-file for this job. Is there any similar application for macports?
>> What should I do in this case?
> As far as I know there's no such commands. At this point you can use standard bash tools, like awk or grep.
> Try something like grep -lir "docbook*" /opt/local/var/macports/

As Joshua said, you won't know what port provides a file until you've installed that port, so that method is not useful for finding files in ports you haven't yet installed.

If you just want to search the port descriptions for a word, "port search" can do that (e.g. "port search docbook").

More information about the macports-users mailing list