Post History
While * belongs to the POSIX standard, ** is an extension. You are right it's not in man 7 glob. Tools that treat ** specially (i.e. not as * simply followed by *) tend to agree what it means, but ...
Answer
#1: Initial revision
While [`*` belongs to the POSIX standard][1], `**` is an extension. You are right it's not in `man 7 glob`. Tools that treat `**` specially (i.e. not as `*` simply followed by `*`) tend to agree what it means, but AFAIK it's only because there is a consensus, not because they all use some common library (like `glob()` [mandated by POSIX][5]) whose documentation could be the ultimate answer to your question. I'm afraid the best you can get is the documentation of each tool, separately. The links you posted are exactly this. None of your links covers `ls **/*` though. This example works because the shell expands `**/*` before `ls` is even started. You tagged `bash`, therefore I assume your shell is Bash. For Bash these are the relevant fragments of the documentation: > `*` Matches any string, including the null string. When the `globstar` shell option is enabled, and `*` is used in a filename expansion context, two adjacent `*`s used as a single pattern will match all files and zero or more directories and subdirectories. If followed by a `/`, two adjacent `*`s will match only directories and subdirectories. <sup>([source][2])</sup> >`globstar` If set, the pattern `**` used in a filename expansion context will match all files and zero or more directories and subdirectories. If the pattern is followed by a `/`, only directories and subdirectories match. <sup>([source][3])</sup> Any other shell (or whatever tool) that supports `**` shall document it for itself. Notes: - Because `**` is an extension, some tools by default suppress their support unless you explicitly enable it. E.g. [here][4] (it's one of the links you posted) we can read "If `recursive` is true, the pattern `**` will …"; but by default `recursive=False`. Similarly in Bash `**` is by default just `*` followed by `*`, this changes when you invoke `shopt -s globstar`. - There is no guarantee all tools that treat `**` specially will expand it in *exactly* the same way. In general there may be edge cases and nuances. Always refer to the documentation of the tool you're actually using. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13 [2]: https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html [3]: https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html [4]: https://docs.python.org/3/library/glob.html [5]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/glob.html