list

How to list only directories in Linux

0:00
Toggle fullscreen Fullscreen button

Sharing buttons:

hi there in this view I'm gonna show you

how I can list only directories in Linux

so you open the shell terminal and type

this command LS so that is the default

command and it will display the all the

files as well and directories but if you

want to show only the directories what

you can do is you can execute this

command LS dash l and then use this

command GRE p to search for the pattern

and search for this pattern here Garrett

D that means it will show only the

directories as you can see this is the

list of her directories in this

particular current folder or current

directory and it can also list hidden

directories as well using this command

LS dash ale and then use the pipe

operator after that GRE p cannot only so

this carrot d it means that search for

all the search for the output of LS dash