[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The returned value of -prune and its documentation

From: Cristian Zoicas
Subject: Re: The returned value of -prune and its documentation
Date: Fri, 10 May 2019 09:00:12 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.2

Bernhard Voelker wrote:
On 4/30/19 1:09 PM, Cristian Zoicas wrote:
The manual page of find says the following for the -prune action:

        True; if the file is a directory, do not descend into it. If -depth is
        given, false; no effect.  Because  -delete implies -depth, you cannot
        usefully use -prune and -delete together.

So I understand that if -depth is given then -prune behaves as follows:

      a) returns false
      b) it has no effect.

The point b) is clear but I think that the documentation is not correct for
the returned value (point a)). See the example below.

Indeed, find.1 is wrong.  The attached fixes it.

I would add one more more thing: the documentation of -prune would be
reformulated and  explicitly specify that -prune returns true for "both files
and folders".

I think with the removal of the wrong "If -depth is given, false; [...]",
this is no longer needed - as for other actions like the -print family.


Thumb up.

Have a nice day,

Cristian Zoicas

reply via email to

[Prev in Thread] Current Thread [Next in Thread]