> Date: Sat, 7 Jan 2017 13:15:05 +0000 > From: Stuart Henderson <s...@spacehopper.org> > > On 2017/01/07 11:32, Marc Espie wrote: > > On Tue, Jan 03, 2017 at 11:15:39PM +0100, Mark Kettenis wrote: > > > > From: "Ted Unangst" <t...@tedunangst.com> > > > > Date: Tue, 03 Jan 2017 16:39:48 -0500 > > > > > > > > I copied this straight from freebsd. Not fixed, but feel free to > > > > correct as > > > > desired. > > > > > > > > This adds a third example showing -delete, mentioning that it's not > > > > standard, > > > > but also hinting that it may work better than "rm -r" when you want to > > > > delete > > > > directories. > > > > > > I really think we should not encourage unportable code like that by > > > giving an example in our manual page. > > > > > > I'm even tempted to say that you should leave the "-exec rm {} \;" > > > example alone. The + here only works because rm(1) accepts multiple > > > file arguments. > > > > Huh ? of course rm accepts multiple file arguments. All "good" unix commands > > accept multiple file arguments, fortunately. That's what makes +exec (or > > xargs for that matter) work. > > I think the reason the example uses ; is probably because we only > added + relatively recently (2012), and adding an example using it > back then would make it harder for people writing scripts that > work on newer and older OpenBSD. Enough time has passed that this > isn't really an issue any more. But I would very much like to keep > an example using ; to demonstrate the shell quoting needed when > people have to use a bad command that only takes one file argument.
Right. That was more or less my point. The man page is there to explain how find(1) works, not to show the most efficient way to delete a bunch of files. Not that a clear and concise discussion of the various trade-offs of \; vs. + vs. -delete would hurt.