May 13, 2004

searching ports

Something I always forget how to do is to search the ports collection for a particular port. For instance, I couldn't remember which directory my ftp server port (in this case bftpd - see link at bottom) was in. A very simple command would have told me:

$ cd /usr/ ports
$ make search name=bftpd
This searches the port collection for any ports that contain the search string. Simple!

bFTPD.org - FTP server for Linux, BSD/OS, FreeBSD, Solaris, DG-UX and Tru64 ]


del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links


Posted by jdarnold at 09:07 AM | TrackBack
Comments

Check out /usr/ports/Tools/scripts/portsearch - it's a lot more flexible than the old make search method allowing you to search on terms contained in the description of a port as well as just on the name (using regexp as well if you want).

Help for portsearch:

portsearch 1.0 - A utility for searching the ports tree.

Options:

-n name Search for "name" in name of ports
-p path Search for "path" in location of ports
-i info Search for "info" in ports COMMENT
-m maint Search for "maint" in ports Maintainer
-x index Search for "index" in ports categories
-b b_deps Search for "b_deps" in build depends of ports
-r r_deps Search for "r_deps" in run depends of ports
-d deps Search for "deps" in both build & run depends of ports
-f file Use "file" instead of /usr/ports/INDEX
-h Print this message and exit

Posted by: Jez on May 14, 2004 08:16 PM

Interesting. One of those nooks and crannies that are so hard to find on FreeBSD! The /usr/ports/Tools/scripts/README is a little scary:

NOTE: These scripts need work and are *NOT* safe to use unless you know what they do. Use at your own risk. Patches would be great, but it is preferred they pass through the maintainer of each particular script.

Probably an overreaction. Did you copy them somewhere more useful that /usr/ports/Tools/scripts, or did you add it to your path?

Posted by: Jonathan Arnold on May 14, 2004 08:39 PM

PS: Thanks for the "real" comment. The spam comments are really getting me down. I keep adding them to the IP block, and the list is getting longer and longer.

Posted by: Jonathan Arnold on May 14, 2004 08:40 PM

Post a comment

(Javascript required)

(Not published)

Comments: (you may use HTML tags for style)