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)
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityHow 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)
What about
find . -type d -name "*name*"
(or use -iname
if you want a case insensitive match)