2017-06-08 22:34:30 +0700, Robert Elz:
> Date: Thu, 8 Jun 2017 10:50:07 +0100
> From: Stephane CHAZELAS <[email protected]>
> Message-ID: <[email protected]>
>
> | It would be like saying: find . -name '.*' should report all the
> | . and .. entries, because those entries are there and we don't
> | want "find" second-guessing that the user doesn't want them.
>
> And so it should ... If I don't want them I can write
>
> find . ! -name . ! -name .. -name '.*' -print
[...]
You mean:
find . \( -name . ! -path . -o -name .. \) -prune -o \
\( ! -name . ! -name .. -name '.*' -print \)
as we don't want "find" to second guess that we don't want
it to descend into the "." and ".." even if we most certainly
do, do we? :-)
--
Stephane