Tuesday, March 21, 2017

bash find all directories matching substring

# find 'here' the directories matching "foo" and display, max search depth 10
find . -maxdepth 10 -type d -name '*foo*' -print

Src: http://stackoverflow.com/questions/16344365/use-bash-to-find-a-folder-name-that-contains-a-string

No comments:

Post a Comment