On 2020-01-29 Álvaro António Santos <aa.san...@campus.fct.unl.pt> wrote:
> The man pages for find (version 4.7.0-git) say the following at the
> end of the "EXPRESSION" section:
> If the whole expression contains no actions other than -prune or
> -print, -print is performed on all files for which the whole
> expression is true.

> For the following 2 examples, assume that find is being run within a
> directory whose only contents are a .git directory (which has the
> "typical" .git project directory structure itself, although that's not
> relevant for this discussion).

> Running the following command:
> find . -path "*/.git" -prune -o -true
> Produces, expectedly, the following output:
> .
> ./.git

> However, running the following command:
> find . -path "*/.git" -prune -o -true -print
> Produces:
> .
[...]

Performing  -print on all files for which the whole expression is true
and "appending -print at the end of the find arguments" are not one and
the same thing. Imho the docs are correct.
find . \( -path "*/.git" -prune -o -true \) -print

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

Reply via email to