SEARCH

List Only the Directories Within the Current Folder

From HowToGeek

Jump to: navigation, search

Very often there are so many files in a folder that the subdirectories get lost in the shuffle. This command makes it really simple to show only the directories.


ls -l | grep ^d

You can alias this command, so all you have to do is type "lsd" at the prompt for this function:

alias lsd="ls -l | grep ^d"