To find directories only
(suppose a particular directory contains lot of files and directories and if we want to see only directories then use following command)
ls -l | grep ^d
find . -type d
Regular expression metacharacters
^ = Start of line
so "ls -l | grep ^d" will grep each line of output from ls for lines that begin with d and only d. (it will ignore d in any other position of the line).
Please find My post asking users to list directories only.