Showing posts with label how to list directories. Show all posts
Showing posts with label how to list directories. Show all posts

Tuesday, July 17

How to view/list only directories in Linux

This is a small post for Linux beginners . Viewing folders can be achieved by two ways in linux/UNIX
  1. Through ls command
  2. Through find command
With ls we have to use grep to get the directory listings..
Ls –l | grep ^d
Through find command
find . -type d
Example