list directory code example
Example 1: get list of directories bash
for d in */ ; do
echo "$d"
done
Example 2: list directory in python
from os import listdir
## Prints the current directory as a list (including file types)
print(os.listdir())
Example 3: list all files in a directory and subdirectory linux
find . -type f -follow -print