How to find out which ports contains a specified command.

Lars Engels lars.engels at 0x20.net
Mon Apr 6 02:17:07 PDT 2009


Quoting Gary Jennejohn <gary.jennejohn at freenet.de>:

> On Sun, 5 Apr 2009 21:19:45 -0400
> Wesley Shields <wxs at FreeBSD.org> wrote:
>
>> On Mon, Apr 06, 2009 at 01:45:43AM +0200, Alberto Villa wrote:
>> > On Sun, Apr 5, 2009 at 10:06 PM, N.J. Mann <njm at njm.me.uk> wrote:
>> > > adduser: /usr/sbin/adduser   
>> /usr/share/man/en.ISO8859-15/man8/adduser.8 /usr/src/usr.sbin/adduser
>> > >
>> > > So, it is part of the base system. ?This can be confirmed by searching
>> > > the on-line manual, i.e.
>> >
>> > anyway, if you're looking for other programs, i can't remember if
>> > there is any special way... i think i'd try something like:
>> > cd /usr/ports && grep -i "bin/$yourcommand" -f */*/pkg-plist
>>
>> This makes two assumptions which are not always true:
>>
>> - It assumes $yourcommand lives in ${PREFIX}/bin.
>> - It searches only pkg-plist.
>>
>> Not all ports install into ${PREFIX}/bin and not all ports use
>> pkg-plist.  If you want a more accurate search you're better off
>> searching Makefile for the information in PLIST_FILES along with
>> pkg-plist.  It is worth noting that even this is not fool-proof since
>> some ports use dynamic plist generation so the information is never in
>> pkg-plist except for when the plist is built.
>>
>> IMO this is a short-coming with ports, and only getting more and more
>> noticeable as we expand the number of ports.  I have some ideas on how
>> to address this if someone wants to ping me about it off list.
>>
>
> /usr/ports/ports-mgmt/portsearch


Or fast and online:
http://www.secnetix.de/tools/porgle/porgle.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: PGP Digital Signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090406/0948a3b2/attachment.pgp


More information about the freebsd-current mailing list