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 5C4221381F3 for ; Sat, 14 Sep 2013 19:17:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8685EE0C1D; Sat, 14 Sep 2013 19:17:03 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 89226E0B5B for ; Sat, 14 Sep 2013 19:17:02 +0000 (UTC) Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id E741A20D45 for ; Sat, 14 Sep 2013 15:17:01 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sat, 14 Sep 2013 15:17:01 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=binarywings.net; h=message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=mesmtp; bh=x40AivtzJ4ULXkBSSKV4gnLq sqQ=; b=i06IFuH5q27kNDMynKlyEE62uWQL+JpvV76voP1bfHOs2J3jkAEkzkV9 zQ6REeR+9n4INTiW+8a1OFxjWVO2OllNdXaH5rIBTT7vORSpG9iLL7obeeuxqdLm T0RyM7BdfpuDpcI+vXtYhXOU485VGgLVQjoTvEfCjY8SECcNB6w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type; s=smtpout; bh=x40A ivtzJ4ULXkBSSKV4gnLqsqQ=; b=pGBhc5E09NtNllab1piOl0JlLuxAuxfThb6T hLtSkJ19RNwfx+N/iAS9Ehp+h1X7jVtiEHA9pEhTc8SnnzaFc4k3RQMdVsDf7WwB 1J1Gn+RYXWzUBQ1tJn889RBBS8eE7sNd6olOglXRdHq4TbxQHjODsBIRXP2Q+czD QceW0Is= X-Sasl-enc: gg+Hj6vGc8OUTVoeWzX3hWZxqiPaDzNHwoAYjWf8wkqn 1379186220 Received: from [10.119.217.212] (unknown [46.115.115.217]) by mail.messagingengine.com (Postfix) with ESMTPA id AC7BDC00E8D for ; Sat, 14 Sep 2013 15:17:00 -0400 (EDT) Message-ID: <5234B614.5030000@binarywings.net> Date: Sat, 14 Sep 2013 21:16:36 +0200 From: Florian Philipp User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130901 Thunderbird/17.0.8 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> <52331848.8030603@yandex.ru> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qEveoSANJveKMF3ngcaJg92C5qgS88cSm" X-Archives-Salt: 7f9b77fd-cd7e-4bff-8ecb-7b21e827f574 X-Archives-Hash: 0efd5631df87caeb78d0c3e9a48bd904 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qEveoSANJveKMF3ngcaJg92C5qgS88cSm Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 14.09.2013 06:04, schrieb Mark David Dumlao: >=20 > On Sep 13, 2013 9:53 PM, "Yuri K. Shatroff" > wrote: >> >> 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=3Dtime {} + >>>> >>>> >>>> >>>> -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 appendi= ng >>> 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= ? >> >=20 > I'm not sure how the internals work. As best as I can guess, it > constructs the argv directly so spaces shouldn't be an issue. Spaces ar= e > an issue when the output is piped through, since the pipe itself knows > no difference between filename and output spaces, hence the need to > force zero delimiters between filenames. Since find runs the command > directly, you shouldn't encounter this. But Ive yet to test. >=20 Your assumption is correct. exec cannot be fooled with whitespaces. Regards, Florian Philipp --qEveoSANJveKMF3ngcaJg92C5qgS88cSm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlI0thoACgkQqs4uOUlOuU9ddwCbBhrm9sBRKkfK8njv1laFCbiF 1GIAmwVGBmDLROYOR21+odvCjtDKV61A =A9WK -----END PGP SIGNATURE----- --qEveoSANJveKMF3ngcaJg92C5qgS88cSm--