Gentoo Archives: gentoo-user

From: Jan Engelhardt <jengelh@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] xargs and rm funkiness
Date: Sat, 22 May 2010 18:38:56
Message-Id: alpine.LSU.2.01.1005222036280.32748@obet.zrqbmnf.qr
In Reply to: Re: [gentoo-user] xargs and rm funkiness by Neil Bothwick
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 "{}" +

Replies

Subject Author
Re: [gentoo-user] xargs and rm funkiness Neil Bothwick <neil@××××××××××.uk>