number of directories in a directory linux code example
Example: number of directories in a directory linux
# this is the answer without using find
ls -lR | grep ^d | wc -l
# this is the answer without using find
ls -lR | grep ^d | wc -l