This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calling cygpath from find exec?


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

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]