0

How to get a list of all the subfolders with a specific name e.g. all the folders which their name contains 'NAME'

I know:

find . | grep *NAME*

but this won't give me a unique list (if the folder has subfolders it gets listed multiple times)

2

What about

find . -type d -name "*name*"

(or use -iname if you want a case insensitive match)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.