Calling cygpath from find exec?

Eric Blake eblake@redhat.com
Tue Dec 1 20:52:00 GMT 2015


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.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20151201/2ffe9d08/attachment.sig>


More information about the Cygwin mailing list