I'm looking for the simplest glob expression that will always expand to the same (possibly empty) set of files as that listed by
find . -type f
…and never result in a no matches found
error, irrespective of the contents of .
.
I've tried many variations of ./{**,.**}/{*,.*}(.N)
that fail under one situation or another. (For example, ./{**,.**}/{*,.*}(.N)
fails to match ./.dir0/.dir1/.file0
.)
EDIT: Assume that extendedglob
is on
, and that nullglob
is off
.
Best Answer
With
zsh
: