use find command to compile a list of all directories in linux code example
Example 1: linux find directores
find -type d -iname $name
Example 2: find command also return directory names?
find . -type d -o -type f
find -type d -iname $name
find . -type d -o -type f