From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A032D1381F3 for ; Fri, 13 Sep 2013 13:51:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5C92E0BAB; Fri, 13 Sep 2013 13:51:07 +0000 (UTC) Received: from forward20.mail.yandex.net (forward20.mail.yandex.net [95.108.253.145]) by pigeon.gentoo.org (Postfix) with ESMTP id 18E7FE0B2D for ; Fri, 13 Sep 2013 13:51:06 +0000 (UTC) Received: from smtp19.mail.yandex.net (smtp19.mail.yandex.net [95.108.252.19]) by forward20.mail.yandex.net (Yandex) with ESMTP id 3AAFA1041537 for ; Fri, 13 Sep 2013 17:51:05 +0400 (MSK) Received: from smtp19.mail.yandex.net (localhost [127.0.0.1]) by smtp19.mail.yandex.net (Yandex) with ESMTP id 1E0B3BE0237 for ; Fri, 13 Sep 2013 17:51:05 +0400 (MSK) Received: from 31.207.68.232.pppoe-dynamic.pushkinnet.ru (31.207.68.232.pppoe-dynamic.pushkinnet.ru [31.207.68.232]) by smtp19.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 1ZCckwi0vY-p4ICf4Yh; Fri, 13 Sep 2013 17:51:04 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1379080264; bh=ICz8Koahx4jucGnfC1h+P1yPVzaUoOQFA0Okdq6IdEI=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=a2bkNEhhYRgTYdnkFVE5LMVaG6s/8ROlXua+EiuzwS3fiNo5jxu7Zz1HFUu5MXJHR eg1rJEgd4jUocxCWJDMe0LiAUtKOmOwyDNC+jU4EHdvVbWHFbHwbPl5VNlxFSxzZ4C PAdPH1mZNPI61yf6IRWqLaHsN5VXv/6YeNnrIp34= Authentication-Results: smtp19.mail.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <52331848.8030603@yandex.ru> Date: Fri, 13 Sep 2013 17:51:04 +0400 From: "Yuri K. Shatroff" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130619 Thunderbird/17.0.6 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] look for a file type + sort References: <20130913044830.GA4586@syscon7.inet> <20130913051148.GB4586@syscon7.inet> <20130913062401.GK6228@Morgoth> <523314C2.3040308@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 757f1671-19d0-4d64-878f-db988abf2f4a X-Archives-Hash: 417483541b7bc0999508daef8e96b7b2 On 13.09.2013 17:43, Mark David Dumlao wrote: > On Fri, Sep 13, 2013 at 9:36 PM, Yuri K. Shatroff wrote: >> On 13.09.2013 10:24, Jean-Christophe Bach wrote: >> [ ... ] >> >>> >>> This one should work: >>> >>> find /home/joseph/ -iname "*.pdf" -exec ls -l --sort=time {} + >> >> >> -exec is not suitable here because it spawns a `ls` process per each found >> entry; aside from being slow, this disallows sorting at all. > > This is incorrect. If you terminate exec with '+' instead of '\;', only a single > instance of the command is run - the command line is built by appending > each found file to the end of the {} placeholder. Sorry, I'm ashamed I didn't know about this feature. Does it also handle spaces correctly? > The only reason I see for it to fail is if you have so many files that > it can't be > passed to the argv of the receiving command. There's always an opportunity to use tempfiles ;) -- Best wishes, Yuri K. Shatroff