file2port search

Thomas Seck tmseck-lists at netcologne.de
Thu May 1 11:04:58 PDT 2003


* Edwin Groothuis (edwin at mavetju.org):

> On Thu, May 01, 2003 at 02:16:27PM +0200, Josef El-Rayes wrote:
>> i was wondering whether there is a more convienient way to resolve a
>> file<->port search, than doing something like this
>> 
>> find /usr/ports -name pkg-plist -print0 | xargs -0 grep <file>
> 
> "grep <file> /var/db/pkg/*/+CONTENTS" would work for all installed ports.
> Don't know if such a beast for all uninstalled ports should work
> too, but compiling a small database for it (dbm) would be a better
> solution than grepping for it.
> 
> But yeah, pkg_which or pkg_search should be nice to have by default.

pkg_info -W /path/to/file

exists.

     --Thomas


More information about the freebsd-ports mailing list