1

Possible Duplicate:
Is there any option with 'ls' command that I see only the directories?

I have a directory with a lot of files but only a few directories.

To get a list of only the directories, what I do is this

ls -l | grep "^d"

I know I can alias it to make it faster, but is there some easier way of doing this that I do not know about?

I checked man ls, but did not find any such flag there.

Also, ls -d displays only a ., nothing else.

Lazer
  • 35,307

0 Answers0