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:
-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?
Thumb up.
Have a nice day,
Berny
Regards
Cristian Zoicas