[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: display directories only



On Mon, Jan 05, 2004 at 08:47:38AM -0600, Rick Weinbender wrote:
> I have a basic question.
> Is there a method using "ls" from the command line to
> have it display only directories.
> I've looked thru the help (ls --help), but cant' guess the right
> switches.

You can fake it like this:

  ls -l | grep ^d

That's a bit grotty, of course. Better would be to use 'find'.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: