Answers for "list only part of directories"

1

list only directories

# List directories under the current working directory.
ls -l | grep "^d"

# List directories under the current working directory and 
# include hidden folders
ls -la | grep "^d"
Posted by: Guest on October-09-2020
0

find only list directories

find . -maxdepth 1 -type d -iname "<regex>" -printf '%fn'
Posted by: Guest on July-29-2021

Browse Popular Code Answers by Language