Professional Web Applications Themes

how to find which port has a given executable - FreeBSD

Hi, I had asked this in a slightly different post but there was no reply so I am posting again. Is it possible to find out which port has a particular executable/script file ? It took me some time to find out if the script epstopdf was in latex or tex or tetex! Any easy way to do this ? Regards, Rajarajan...

  1. #1

    Default how to find which port has a given executable

    Hi,
    I had asked this in a slightly different post but there was no reply
    so I am posting again.

    Is it possible to find out which port has a particular
    executable/script file ? It took me some time to find
    out if the script epstopdf was in latex or tex or tetex!

    Any easy way to do this ?

    Regards,

    Rajarajan
    Rajarajan Guest

  2. #2

    Default Re: how to find which port has a given executable

    On Wednesday 23 March 2005 09:33 am, Rajarajan Rajamani wrote: 

    Here is an example:

    pkg_info -W /usr/X11R6/bin/nedit
    /usr/X11R6/bin/nedit was installed by package nedit-5.5

    -Mike
    Michael Guest

  3. #3

    Default Re: how to find which port has a given executable

    Michael C. Shultz wrote:
     
    >Here is an example:
    >
    >pkg_info -W /usr/X11R6/bin/nedit
    >/usr/X11R6/bin/nedit was installed by package nedit-5.5
    >
    >[/ref]
    I think the question might have been about a file from port which wasn't
    yet installed, in which case it's a little more time consuming:

    % find /usr/ports -type f -name pkg-plist -exec egrep -H epstopdf {} \;
    /usr/ports/chinese/cwtex/pkg-plist:share/texmf/cwtex/help/epstopdf.txt
    /usr/ports/print/teTeX-base/pkg-plist:bin/epstopdf
    /usr/ports/print/teTeX-texmf/pkg-plist:%%TEXMFDISTDIR%%/doc/help/Catalogue/entries/epstopdf.html
    /usr/ports/print/teTeX-texmf/pkg-plist:%%TEXMFDISTDIR%%/tex/latex/oberdiek/epstopdf.sty
    /usr/ports/textproc/rubber/pkg-plist:%%PYTHON_SITELIBDIR%%/rubber/graphics/epstopdf.py
    /usr/ports/textproc/rubber/pkg-plist:%%PYTHON_SITELIBDIR%%/rubber/graphics/epstopdf.pyc
    /usr/ports/japanese/ptex-common/pkg-plist:bin/epstopdf

    --Alex


    Alex Guest

  4. #4

    Default Re: how to find which port has a given executable

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 2005-03-23, Alex Zbyslaw scribbled these
    curious markings: 

    Just a bit of nitpickery: I've found that piping the output to xargs
    rather than using find's exec produces faster results. Plus, you (most
    of the time) don't need to use constructs like {} \;. :)

    Best Regards,
    Christopher Nehren
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iD8DBQFCQbSzk/lo7zvzJioRAirsAJ9oq+xJr6AHgscuUXBIzWvvsa33mgCeOnz5
    8JesEMbAHU9K0SAgpb8B7eo=
    =nKZB
    -----END PGP SIGNATURE-----

    --
    I abhor a system designed for the "user", if that word is a coded
    pejorative meaning "stupid and unsophisticated". -- Ken Thompson
    If you ask the wrong questions, you get answers like "42" and "God".
    Unix is user friendly. However, it isn't idiot friendly.

    Christopher Guest

  5. #5

    Default Re: how to find which port has a given executable

    On Mar 23, 2005, at 1:22 PM, Christopher Nehren wrote: 
    >
    > Just a bit of nitpickery: I've found that piping the output to xargs
    > rather than using find's exec produces faster results. Plus, you (most
    > of the time) don't need to use constructs like {} \;. :)[/ref]

    pkg_which epstopdf

    ....is probably even faster and easier.

    --
    -Chuck

    Charles Guest

  6. #6

    Default Re: how to find which port has a given executable

    On Wed, Mar 23, 2005 at 12:33:13PM -0500, Rajarajan Rajamani wrote: 

    pkg_which, from the portupgrade port works very nicely for this.

    Roland
    --
    R.F. Smith /"\ ASCII Ribbon Campaign
    r s m i t h x s 4 a l l . n l \ / No HTML/RTF in e-mail
    http://www.xs4all.nl/~rsmith/ X No Word docs in e-mail
    public key: http://www.keyserver.net / \ Respect for open standards

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iD8DBQFCQeZ4EnfvsMMhpyURAvGKAKCI1yTBCNSwc63rkgKRhf 3tHwDzJACgi+jL
    kGPAojALyqF0f6hFrY20H2g=
    =BGG4
    -----END PGP SIGNATURE-----

    Roland Guest

  7. #7

    Default "pkg_info -W" useless for symlink-accessible command (was Re: how to find which port has a given executable)

    in message <com>,
    wrote Michael C. Shultz thusly... 

    (I tried on 5.3-p5; used to have same issue on 4.6-4.11.)

    I always had problems w/ that as so far i tried only the file name,
    w/o the path. So "pkg_info -W /misc/local/bin/s2p" gives ...

    /misc/local/bin/s2p was installed by package perl-5.8.6_2


    .... but "pkg_info -W s2p" produces nothing, even though the man page
    says ...

    -W For the specified filename argument show which package it
    belongs to. If the file is not in the current directory, and
    does not have an absolute path, then the PATH is searched using
    which(1).


    BTW, "which s2p" gives ...

    /usr/local/bin/s2p

    (where /usr/local is symlinked to /misc/local.)


    Apparently "pkg_info -W" is useless unless the *real path* is given.
    A quick/dirty wrapper would be (works in bash3 & sh) then ...

    for cmd in $
    do
    pkg_info -W $(realpath $(which $cmd))
    done


    - Parv

    --

    Parv Guest

  8. #8

    Default Re: how to find which port has a given executable

    Christopher Nehren wrote:
     
    >
    >Just a bit of nitpickery: I've found that piping the output to xargs
    >rather than using find's exec produces faster results. Plus, you (most
    >of the time) don't need to use constructs like {} \;. :)
    >
    >[/ref]
    I've been typing it like this for 20 years and my fingers can type {} \;
    faster than a speeding bullet, or at least a run-away zimmer frame.
    Leave us old fogeys in peace. You and your new fangled commands
    starting with x that aren't X11 applications. If it wasn't in 4.1BSD it
    isn't worth using. Anyway, the manual page for xargs just makes my
    brain hurt. :)

    Charles Swiger wrote: On Mar 23, 2005, at 1:22 PM,
     

    % pkg_which epstopdf
    epstopdf: not found

    Just like pkg_info -W it doesn't seem to work unless the package is
    installed

    --Alex


    Alex Guest

Similar Threads

  1. ? Moving from port 8500 to port 80 on XP
    By b1boogie in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: February 27th, 12:19 AM
  2. Replies: 3
    Last Post: February 14th, 06:43 AM
  3. Replies: 2
    Last Post: October 10th, 08:03 AM
  4. Replies: 3
    Last Post: July 10th, 04:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139