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

Re: display directories only



On Tue, 06 Jan 2004 11:44:51 +0000, Jonathan Dowland wrote:

> On Mon, Jan 05, 2004 at 09:58:52AM -0800, Nano Nano wrote:
>> On Mon, Jan 05, 2004 at 06:43:23PM +0100, Elimar Riesebieter wrote:
>> > On Mon, 05 Jan 2004 the mental interface of 
>> > Rick Weinbender told:
>> > 
>> > > 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.
>> > 
>> > I am using the zShell zsh. In there it is easy:
>> > 
>> > alias lsd='ls -lad *(/)'
>> > alias lsddots='ls -lad .*(/)
>> > 
>> 
>> #ls -d `find -type d -maxdepth 1`
>> 
>> ? can't think of anything simpler
> 
> Well those aliases are, for a start - only one process. Here are some
> for sh:
> 
> alias lsd='ls -d */'

Aliases are so last-century, though.

lsd() { ls -d */; }

-- 
....................paul

Programming without a hex editor is like watchmaking without a hammer.




Reply to: