Reputation: 148
How to glob **/*.log
, where **
could be symlinks to directories but the .log
files are not symlinks?
I did try **(@)/*.log
and **/*.log(@)
without any luck.
Upvotes: 3
Views: 464
Reputation: 2981
To follow symbolic links, you need yet another asterisk:
***/*.log
Look for the Recursive Globbing section in the zshexpn
man page.
Depending on how your links are set up, you could get the same file listed multiple times in the glob results (that's probably why zsh doesn't include symbolic links in the ** pattern).
Upvotes: 3