这将工作在Bash 4:
ls -l {,**/}*.ext
为了使双星号glob工作,需要设置globstar选项(默认:on):
shopt -s globstar
从人bash:
globstar If set,the pattern ** used in a filename expansion con‐ text will match a files and zero or more directories and subdirectories. If the pattern is followed by a /,only directories and subdirectories match.