Re: [gentoo-user] xargs and rm funkiness

2010-05-29 Thread Daniel D Jones
On Wednesday 26 May 2010 06:42:08 Joerg Schilling wrote: Patrick Holthaus patrick.holth...@uni-bielefeld.de wrote: You might try: find -name *.ext -print0 | xargs -0 rm But this is non-standard. In what way is this non-standard? That is, what standard is it contrary to? TMTOWTDI

Re: [gentoo-user] xargs and rm funkiness

2010-05-29 Thread Etaoin Shrdlu
On Saturday 29 May 2010, Daniel D Jones wrote: On Wednesday 26 May 2010 06:42:08 Joerg Schilling wrote: Patrick Holthaus patrick.holth...@uni-bielefeld.de wrote: You might try: find -name *.ext -print0 | xargs -0 rm But this is non-standard. In what way is this non-standard?

Re: [gentoo-user] xargs and rm funkiness

2010-05-29 Thread Joerg Schilling
Etaoin Shrdlu shr...@unlimitedmail.org wrote: On Saturday 29 May 2010, Daniel D Jones wrote: On Wednesday 26 May 2010 06:42:08 Joerg Schilling wrote: Patrick Holthaus patrick.holth...@uni-bielefeld.de wrote: You might try: find -name *.ext -print0 | xargs -0 rm But this is

Re: [gentoo-user] xargs and rm funkiness

2010-05-29 Thread Alan McKinnon
On Saturday 29 May 2010 17:05:34 Daniel D Jones wrote: On Wednesday 26 May 2010 06:42:08 Joerg Schilling wrote: Patrick Holthaus patrick.holth...@uni-bielefeld.de wrote: You might try: find -name *.ext -print0 | xargs -0 rm But this is non-standard. In what way is this

Re: [gentoo-user] xargs and rm funkiness

2010-05-29 Thread Daniel D Jones
On Saturday 29 May 2010 14:59:16 Alan McKinnon wrote: On Saturday 29 May 2010 17:05:34 Daniel D Jones wrote: ... -exec (which potentially has problems with race conditions - -execdir should almost always be used instead) runs the command once for each file found. xargs will call the command

Re: [gentoo-user] xargs and rm funkiness

2010-05-26 Thread Joerg Schilling
Neil Bothwick n...@digimed.co.uk wrote: xargs can suck with anything but plain ASCII-without-spaces filenames., and it quite unnecessary here. find -name *.ext -exe rm {} \; or maybe even find -name *.ext -exe rm {} + Just avoid xargs as it is the source of the proplem. find -name *.ext

Re: [gentoo-user] xargs and rm funkiness

2010-05-26 Thread Joerg Schilling
Patrick Holthaus patrick.holth...@uni-bielefeld.de wrote: You might try: find -name *.ext -print0 | xargs -0 rm But this is non-standard. UNIX introduced -exec {} + 1990 (when David Korn rewrote find(1) and it is in the POSIX standared since some time. Jörg --

Re: [gentoo-user] xargs and rm funkiness

2010-05-23 Thread Daniel D Jones
On Saturday 22 May 2010 08:25:55 Neil Bothwick wrote: On Sat, 22 May 2010 12:35:10 +0100, David W Noon wrote: find -name *.ext -exe rm {} + Or simpler still: find -name *.ext -delete Neat - I hadn't noticed that option. Anyone for find / -delete ? If you use the -delete switch,

Re: [gentoo-user] xargs and rm funkiness

2010-05-22 Thread Neil Bothwick
On Fri, 21 May 2010 21:49:49 -0400, Daniel D Jones wrote: find -name *.ext | xargs -0 rm I get the result: rm: cannot remove `Long File Name One.ext\nLong File Name Two.ext\nLong File Name Three.ext\n': File name too long. xargs can suck with anything but plain ASCII-without-spaces

Re: [gentoo-user] xargs and rm funkiness

2010-05-22 Thread Patrick Holthaus
Hey! On Saturday 22 May 2010 03:49:49 Daniel D Jones wrote: Running the command: find -name *.ext | xargs -0 rm You might try: find -name *.ext -print0 | xargs -0 rm Cheers Patrick signature.asc Description: This is a digitally signed message part.

Re: [gentoo-user] xargs and rm funkiness

2010-05-22 Thread David W Noon
On Sat, 22 May 2010 10:10:02 +0200, Neil Bothwick wrote about Re: [gentoo-user] xargs and rm funkiness: On Fri, 21 May 2010 21:49:49 -0400, Daniel D Jones wrote: find -name *.ext | xargs -0 rm I get the result: rm: cannot remove `Long File Name One.ext\nLong File Name Two.ext\nLong File

Re: [gentoo-user] xargs and rm funkiness

2010-05-22 Thread Neil Bothwick
On Sat, 22 May 2010 12:35:10 +0100, David W Noon wrote: find -name *.ext -exe rm {} + Or simpler still: find -name *.ext -delete Neat - I hadn't noticed that option. Anyone for find / -delete ? -- Neil Bothwick Top Oxymorons Number 31: Small crowd signature.asc Description: PGP

Re: [gentoo-user] xargs and rm funkiness

2010-05-22 Thread Daniel D Jones
On Friday 21 May 2010 22:11:49 cov...@ccs.covici.com wrote: Daniel D Jones ddjo...@riddlemaster.org wrote: Running the command: find -name *.ext | xargs -0 rm I get the result: rm: cannot remove `Long File Name One.ext\nLong File Name Two.ext\nLong File Name Three.ext\n': File

Re: [gentoo-user] xargs and rm funkiness

2010-05-22 Thread Jan Engelhardt
On Saturday 2010-05-22 09:46, Neil Bothwick wrote: On Fri, 21 May 2010 21:49:49 -0400, Daniel D Jones wrote: find -name *.ext | xargs -0 rm I get the result: rm: cannot remove `Long File Name One.ext\nLong File Name Two.ext\nLong File Name Three.ext\n': File name too long. xargs can

Re: [gentoo-user] xargs and rm funkiness

2010-05-22 Thread Neil Bothwick
On Sat, 22 May 2010 20:38:53 +0200 (CEST), Jan Engelhardt wrote: xargs can suck with anything but plain ASCII-without-spaces filenames., That's why you use NUL terminators. Simple as that. That only helps with spaces, what if filenames contain other reserved characters? Also find's -exe

[gentoo-user] xargs and rm funkiness

2010-05-21 Thread Daniel D Jones
Running the command: find -name *.ext | xargs -0 rm I get the result: rm: cannot remove `Long File Name One.ext\nLong File Name Two.ext\nLong File Name Three.ext\n': File name too long. (The actual list is much longer than this, of course, or I wouldn't be using xargs.) For some reason, the

Re: [gentoo-user] xargs and rm funkiness

2010-05-21 Thread covici
Daniel D Jones ddjo...@riddlemaster.org wrote: Running the command: find -name *.ext | xargs -0 rm I get the result: rm: cannot remove `Long File Name One.ext\nLong File Name Two.ext\nLong File Name Three.ext\n': File name too long. (The actual list is much longer than this, of