[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The returned value of -prune and its documentation
From: |
Bernhard Voelker |
Subject: |
Re: The returned value of -prune and its documentation |
Date: |
Sun, 5 May 2019 12:31:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 4/30/19 1:09 PM, Cristian Zoicas wrote:
> The manual page of find says the following for the -prune action:
>
> -prune
> 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.
WDYT?
Have a nice day,
Berny
0001-find.1-correct-description-about-prune-when-depth-is.patch
Description: Text Data