Match all files under all nested directories with shell globbing
问题 Is there a way to use shell globbing to identify nested directories? so if I have dir/dir1/dir2/dir3/dir4/dir5/.. and I have files under all of them, what is the equivalent globbing pattern to match all files under all directories, similar to - for example - ls -R 回答1: In Bash 4, with shopt -s globstar , and zsh you can use **/* which will include everything except hidden files. You can do shopt -s dotglob in Bash 4 or setopt dotglob in zsh to cause hidden files to be included. In ksh, set -o