how to show only directories in linux terminal code example Example: get list of directories bash for d in */ ; do echo "$d" done