delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/12/01/15:52:49

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; q=dns; s=default; b=E+7m
yLw9tCbP7Wdfhq+S48zuZOuRjgouA9/4TwgV6GG/F26hXUWVxuk/GDSGUi1vygXB
ieYtIPvNERazFBepEkJWdowit2pzkiKL96JuayuPtQ2in+b7hjG+kkQURy1dGW4n
7/BAkJX86cy9mYj1Y91+f9IvYLkmUVNyNWxn+Zc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; s=default; bh=DIO7JDRGZn
Vrxxt7+Q1t3O57Gzs=; b=ZpmYuho2rmQ7ATZjwxdXBi7Oz8MSIRNFhICb0+rtyl
2xiivkvVKsd79LFD3Xbgx15oJ+O+pkLjrWmMrs4fFdGrHNExtVHrtOsV66U5gBvr
aNZDdCmoG7XxzPjKFvhFL8UUl1YMb/YAtzceDRgegZVWlWlgOOK/Jrty0cawRJm5
w=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_40,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: mx1.redhat.com
Subject: Re: Calling cygpath from find exec?
To: cygwin AT cygwin DOT com
References: <56537B03 DOT 4050204 AT codespunk DOT com> <565383D5 DOT 3010709 AT redhat DOT com> <20151201204301 DOT GB2707 AT dimstar DOT local DOT net>
From: Eric Blake <eblake AT redhat DOT com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Message-ID: <565E0882.9060408@redhat.com>
Date: Tue, 1 Dec 2015 13:52:18 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <20151201204301.GB2707@dimstar.local.net>
X-IsSubscribed: yes

--b2PxPLtGihSmNvgWIMPQ6LB4Ep9qcp1E1
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 12/01/2015 01:43 PM, Duncan Roe wrote:

>> Why not just:
>>
>> find . -exec cygpath -wa {} +
>>
>> since cygpath handles more than one file in an invocation (that is,
>> using '-exec {} +' rather than '-exec {} \;' is generally faster).
>>
> I would be using xargs. Especially under /cygdrive, the "-print0 / xargs =
-0"
> combination takes care of spaces and other nasties in file names.

But so does 'find ... -exec ... {} +', and with one fewer process.
xargs is fine when you need it, but here, you don't.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--b2PxPLtGihSmNvgWIMPQ6LB4Ep9qcp1E1
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
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJWXgiDAAoJEKeha0olJ0NqYnQIAIeorppnlzxWKH/fHfd38S99
xKYz4ptsnPhxqCeO+JmDpWIVZLxxpj6m8MCkG1awcf+MUX7dDCVb20xHpZbQguvO
pLa3cY79YjLLeOi2eZYf5L4/nieAlg4T8mD4ACDyQvFqJ5gvUVLTtcjXmHJ9kBlh
oKzK32/mIkghLuEfMnbPYKm+3DgR00yqB8bKkefGv0pPFAcFvSJNI1Dxae/i8Sll
i/scIoNrhzJzdYOf/mFZYxCfpaWEmFlLhDIyLKl/uMBI6lnC/iO43imXvcLOq4cq
dzwGQPpzaKLcrwS9U3L2AtRBOJOXOC7+N579ue9A/9m3zhIKtBcshj9WTCumDSs=
=cYua
-----END PGP SIGNATURE-----

--b2PxPLtGihSmNvgWIMPQ6LB4Ep9qcp1E1--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019