The command argument of the example
uses the glob sntax of
It does not work for
bash, for example.
The characters in the
() are glob qualifiers; Multiple qualifiers are combined by logical
AND - that is, they all ned to apply.
So the command above shows filenames that are readable, writable and executable for the group. They have the permissions that are set by
A more portable way to search files by permissions is using the
-perm test of
find -perm -g=rwx
Besides working independent of the shell, the syntax also tends to be more readable.
Patterns used for filename generation may end in a list of qualifiers
enclosed in parentheses. The qualifiers specify which filenames that other‐
wise match the given pattern will be inserted in the argument list.
If the option BARE_GLOB_QUAL is set, then a trailing set of parentheses con‐
taining no `|' or `(' characters (or `~' if it is special) is taken as a set
of glob qualifiers. A glob subexpression that would normally be taken as
glob qualifiers, for example `(^x)', can be forced to be treated as part of
the glob pattern by doubling the parentheses, in this case producing
If the option EXTENDED_GLOB is set, a different syntax for glob qualifiers
is available, namely `(#qx)' where x is any of the same glob qualifiers used
in the other format. The qualifiers must still appear at the end of the
pattern. However, with this syntax multiple glob qualifiers may be chained
together. They are treated as a logical AND of the individual sets of
[ ... ]
A group-readable files (0040)
I group-writable files (0020)
E group-executable files (0010)
R world-readable files (0004)
W world-writable files (0002)
X world-executable files (0001)
man zshall | less '+/Glob Qualifiers' or