removing a file with hyphens

Jonathan Stowe jns at gellyfish.com
Thu Jun 7 15:05:17 BST 2007


On Thu, 2007-06-07 at 14:13 +0100, David Cantrell wrote:
> On Thu, Jun 07, 2007 at 01:50:14PM +0100, Jonathan Stowe wrote:
> > On Thu, 2007-06-07 at 13:20 +0100, Matt Wilson wrote:
> > > > #  find . -name '*Original' -exec rm {} \;
> > > ARGH!
> > Yeah, could have at least used the '-delete' action of 'find' to save
> > the potential deaths of thousands of angels/fairies/kittens/(whatever it
> > is that dies when you fork).
> 
> It's easier to test the -exec version:
> 
>   find . -name foo\* -exec echo rm {} \;
> 
> to make sure you're deleting the right stuff.  Additionally, -delete
> seems to be a GNUism.  At least, it's not documented on the NetBSD box
> whose find manpage I just looked at.
> 

It is marked as "GNU, Mac OS, FreeBSD" in the GNU findutils/parser.c -
but I have no way of knowing if FreeBSD copied it from GNU.
 
> xargs -n is what you want if you want to be kind to angels/fairies/
> kittens.

But I WANT to kill them ....

/J\



More information about the london.pm mailing list