Answers for "linux list only 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
9

linux list directories

ls -d */
Posted by: Guest on June-15-2020
0

bash find only list directories

find . -type d -iname "<your regex>" -printf '%fn'
Posted by: Guest on July-29-2021
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