[X-Unix] find's -quit

Scott Forbes sforbes42 at earthlink.net
Sun Jun 3 07:21:07 PDT 2007


On Jun 3, 2007, at 12:30 AM, Filipp Lepalaan wrote:

> Hi gang,
>
> Just a quick question that kinda stumped me. How do you limit  
> find's search results to just the first result?
> GNU find has -quit (http://unixhelp.ed.ac.uk/CGI/man-cgi?find) but  
> I can't seem to find any equivalent on OS X.
>
> This is for performance reasons so head is not an option.

I don't see that option either, but if stuck you could get findutils  
from DarwinPorts and use gfind:

-> sudo port install findutils
...
-> cd /opt/local/bin
-> gfind -name 'g*' -print -quit
./qawk
->



More information about the X-Unix mailing list