On 09/15/2014 03:15 PM, Eric Blake wrote:
> On 09/15/2014 03:02 PM, Brant Knudson wrote:
> 
>>>> Good thing that python modules can't have spaces in their names! But for
>>>> the future, find has a "-delete" parameter that won't break horribly on
>>>> strange filenames.
>>>>
>>>> find . -name '*.pyc' -delete
>>>
>>> GNU find has that as an extension, but POSIX does not guarantee it, and
>>> BSD find lacks it.
>>>
>>>
>> The workaround is -print0: find . -name '*.pyc' -print0 | xargs -0 rm -f
> 
> Alas, both find -print0 and xargs -0 are also a GNU extensions not
> required by POSIX.

find . -name '*.pyc' -exec rm -f \{} +

is POSIX.

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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to