Can ls be made to only list directories?

Keith Gabryelski ag at cbmvax.commodore.com
Mon Sep 3 03:41:27 AEST 1990


In article <13725 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>In article <90243.151817SML108 at psuvm.psu.edu> SML108 at psuvm.psu.edu (Scott the Great) writes:
>>As the subject asks, is there a set of options which will limit
>>ls to listing directories?
>
>	$ ls -ld `find . -type d -print`	# for example

Which will list all subdirectories also; which is probably not what
Scott wanted.

	$ ls -ld `echo */.`

is probably more in tune to what was requested.  CAVEAT: directories
starting with `.' are not displayed.  Modify as needed.

Pax, Keith



More information about the Comp.unix.questions mailing list