[Dovecot] 1.0.rc10 released

Logan Shaw lshaw at emitinc.com
Tue Oct 17 22:00:16 UTC 2006


On Tue, 17 Oct 2006, Richard Laager wrote:
> On Tue, 2006-10-17 at 13:25 -0500, Logan Shaw wrote:
>> On Tue, 17 Oct 2006, Noel Jones wrote:
>>> On 10/17/06, Geert Hendrickx <ghen at telenet.be> wrote:

>>>> On *BSD you can also use find -X which properly quotes the results.

>>> Nope, find -X skips files with strange characters. find -print0 |
>>> xargs -0 is the proper solution.
>>> $ man find

>>      find . -type f -name '*whatever*' -exec rm '{}' '+'

> Yes, but as already mentioned, this has the bad side effect of fork()ing
> one rm process per file, which is really inefficient.

I may not have highlighted the "+" clearly enough.  It behaves
differently than ";" does.

What I was saying is that if you are going to use a non-portable
find feature (like "-print0"), Solaris 10 allows you to give "+"
instead of ";" at the end.  Then, as the Solaris 10 manual
page says,

 	If the last argument to -exec is {} and you specify +
 	rather than the semicolon (;), the command is invoked
 	fewer times, with {} replaced by groups of pathnames.

So that is just as clean as the inefficient way, and more
efficient than the "-print0 | xargs -0" way.

   - Logan


More information about the dovecot mailing list