How to do it...

Directories in the current path can be displayed in the following ways:

  1. Use ls with -d to print directories:
        $ ls -d */
  1. Use ls -F with grep:
        $ ls -F | grep "/$"
  1. Use ls -l with grep:
        $ ls -l | grep "^d"
  1. Use find to print directories:
         $ find . -type d -maxdepth 1 -print