list command to list contents of directories on linux code example Example: get list of directories bash for d in */ ; do echo "$d" done