1 |
On Saturday 2010-05-22 09:46, Neil Bothwick wrote: |
2 |
|
3 |
>On Fri, 21 May 2010 21:49:49 -0400, Daniel D Jones wrote: |
4 |
> |
5 |
>> find -name *.ext | xargs -0 rm |
6 |
>> |
7 |
>> I get the result: |
8 |
>> |
9 |
>> rm: cannot remove `Long File Name One.ext\nLong File Name Two.ext\nLong |
10 |
>> File Name Three.ext\n': File name too long. |
11 |
> |
12 |
>xargs can suck with anything but plain ASCII-without-spaces filenames., |
13 |
|
14 |
That's why you use NUL terminators. Simple as that. |
15 |
|
16 |
Also find's -exe calls rm *for each* file when used with \;. |
17 |
|
18 |
>find -name *.ext -exe rm "{}" \; |
19 |
> |
20 |
>or maybe even |
21 |
> |
22 |
>find -name *.ext -exe rm "{}" + |