Why isn't my glob pattern recursing all folders?


This could be caused by various things, but one of the most common reasons that you might not see your globbing pattern recurse all folders is due to a bash configuration option. The option is called globstar. If you're using bash v4 or higher you can turn it on with shopt -s globstar or turned off with shopt -u globstar. If you'd like the recursive glob pattern ** to recurse subfolders then globstar should be turned on.

Sometimes globstar will be turned off by default and it needs to be turned on.

Further Watching:

Was this article helpful?
3 out of 4 found this helpful



Please sign in to leave a comment.