Linux: How to list only folders with ls

decl(25)
Published in
#linux
Words
43
Reading
1 min
9y
Listen to this post
~1 min

Do you want to show only the folders in current the directory ? And not all files ?

Try this one:
$ ls -d */

Where -d lists the directory itself, not the contents and */ shows every folder in the current directory.

Linux: How to list only folders with ls | Ecency