Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Feb 2013 19:05:57 +0000
From:      Chris Rees <utisoft@gmail.com>
To:        Mark Felder <feld@feld.me>
Cc:        Bernard Higonnet <bthcom@higonnet.net>, "A.J. 'Fonz' van Werven" <fonz@skysmurf.nl>, FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: Is there an easy way to find out which port loads which library?
Message-ID:  <CADLo8380aCdX7JSjWCS79uQTideftB=S8SK1QHT79XDMpDAxrQ@mail.gmail.com>
In-Reply-To: <op.wsrk6ygo34t2sn@tech304.office.supranet.net>
References:  <51210EAD.3010009@higonnet.net> <20130217172125.GA63086@spectrum.skysmurf.nl> <CADLo83-nsAuUnrHVvkfDC_TC-Q9JL=ggn6%2BpdAYKFe16%2B55B%2Bg@mail.gmail.com> <op.wsrk6ygo34t2sn@tech304.office.supranet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19 February 2013 19:00, Mark Felder <feld@feld.me> wrote:
> On Sun, 17 Feb 2013 15:56:26 -0600, Chris Rees <utisoft@gmail.com> wrote:
>
>> Most shells won't allow an argument list that long.
>> % find /usr/ports -depth 3 -name pkg-plist -exec grep libfoobar.so \{} \;
>> has been shown to be faster than hacking around arg list limits with echo
>> |
>> xargs.
>
>
> The following may prove to be even faster as it fills the shell argument
> list as full as possible for each execution of grep.
>
> % find /usr/ports -depth 3 -name pkg-plist -exec grep libfoobar.so \{} +
>
> (notice the + at the end)
>
> It's something I picked up from here: http://www.etalabs.net/sh_tricks.html
>

I deliberately chose \; because most tests show no difference, and for
some reason it fails on csh :/

http://www.bayofrum.net/~crees/scratch/find-plus

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo8380aCdX7JSjWCS79uQTideftB=S8SK1QHT79XDMpDAxrQ>