From owner-freebsd-questions@FreeBSD.ORG Sat Jun 14 02:10:47 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2E21065671 for ; Sat, 14 Jun 2008 02:10:47 +0000 (UTC) (envelope-from chris@monochrome.org) Received: from mail.monochrome.org (b4.ebbed1.client.atlantech.net [209.190.235.180]) by mx1.freebsd.org (Postfix) with ESMTP id B5E1E8FC18 for ; Sat, 14 Jun 2008 02:10:46 +0000 (UTC) (envelope-from chris@monochrome.org) Received: from [192.168.1.11] ([192.168.1.11]) by mail.monochrome.org (8.14.2/8.14.2) with ESMTP id m5E2Ahl4072716; Fri, 13 Jun 2008 22:10:43 -0400 (EDT) (envelope-from chris@monochrome.org) Date: Fri, 13 Jun 2008 22:10:43 -0400 (EDT) From: Chris Hill To: Gilles In-Reply-To: <96d454pk73ornom636es6caii1cl8h29dt@4ax.com> Message-ID: <20080613220813.X70655@tripel.monochrome.org> References: <96d454pk73ornom636es6caii1cl8h29dt@4ax.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-questions@freebsd.org Subject: Re: [Ports] How to find where a port is located? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2008 02:10:47 -0000 On Fri, 13 Jun 2008, Gilles wrote: > Hello > > Currently, to find where a software is located under /usr/ports/, I > rune the "find" command. Is there a database that I could query > instead so that it gives out the whole path to that the application? I wrote a lame-ass script to do this: $ more /home/chris/bin/findport #!/bin/sh # # Find a port whose name contains the string supplied as argument # prev_dir=`pwd` cd /usr/ports # make search key=$1 | grep Path | grep -v deps | grep -i $1 # cd $prev_dir HTH. -- Chris Hill chris@monochrome.org ** [ Busy Expunging <|> ]