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

Re: Simple sh or alias to list directories



  using -d for this is confusing like hell because -d is 'well known'
switch in standard unix ls - it lists directory as if it were file, i.e.
does not list the content of the directory (useful with -l), it has no
effect on files (they are listed just like they would be without -d)

	erik

Jeff Howie wrote:
> 
> I _LIKE_ IT (ie 'ls -d */')! :&) Up 'til now I've been using:
> 
>     lld() {
>         ls -l $@ | grep -E ^d
>         return 0
>     }
> 
> But your solution is much more elegant.
> 
> thks.jeff
> 
> On Tue, Oct 17, 2000 at 11:49:32PM +0518, USM Bish wrote:
> > I am on bash. This is part of the the output of the
> > command "ls -d */" on my home directory.  Only  the
> > sub dirs are displayed.
> >
> > aedes:~$ls -d */
> > Mail/             page/               nsmail/
> > bd4v605/          free/               tklatex/
> >
> > HTH
> >
> > alias lsd="ls -d */" should do your job !
> >
> > On Tue, Oct 17, 2000 at 02:36:05PM +0000, Thomas Halahan wrote:
> > > Hello,
> > >
> > > I am trying to determine an easy alias or sh script that will list
> > > only the directories in a directory.  It should have similar
> > > functionality to the ls command.  E.g.
> > >
> > > [tom]$ lsd ~
> > >
> > > should list only the directories in my home folder, not the files.
> > >
> > > Does  anyone know of a way to do this please?
> 
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null



Reply to: