How to find a specific folder by name with something similar to `find -prune`?
anderson-sousa opened this issue · 2 comments
anderson-sousa commented
What version of fd
are you using?
8.7.1
Given the following folder structure:
/home/user/zzz-aaa/
/home/user/aaa/
/home/user/aaa/aaa/
Which command can I use to select the second folder: /home/user/aaa/
?
I tried different forms with fd
but none worked for me.
With find
I'm using:
find /home/user -type d -regex '.*/aaa$' -prune
I appreciate any help anyone can provide.
tmccombs commented
I think something like fd --type d --prune '^aaa$' /home/user
would do what you want.
anderson-sousa commented
Thanks @tmccombs!