Use bash to find first folder name that contains a string March 26, 2023 by Tarik You can use the -quit option of find: find <dir> -maxdepth 1 -type d -name '*foo*' -print -quit