Home > Linux > Command to list directories only

Command to list directories only

August 19th, 2009 Leave a comment Go to comments

If you want to list only directories in current directory, use command:

ls -l ./ | grep ^d | awk '{print $9}'

It can be useful for input for another application or command.

Categories: Linux Tags: ,
  1. No comments yet.
  1. No trackbacks yet.