bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to only find the first hit then return?


From: Eric Blake
Subject: Re: How to only find the first hit then return?
Date: Thu, 25 Aug 2011 19:39:40 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110817 Fedora/3.1.12-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.12

On 08/25/2011 06:46 PM, Peng Yu wrote:
Hi,

By default, find will look for all the matches. Is there a way to let
find only get the first match and then return?

find ... -print -quit

does your normal ... find, prints the first answer, then quits.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]