Skip to content

How to search only files that have a particular directory name anywhere in the path? #1829

Discussion options

You must be logged in to vote

Well, as is the case often, I just tried this after posting the question:

$ rg --files -g '**/baz/**'
foo/baz/f2.txt
abc/ijk/baz/qq/f3.txt
baz/f4.txt

Is this the correct way to do this?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BurntSushi
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants