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

Re: Simple sh or alias to list directories



Sorry to be late in replying. I pick up mail once a
day only. 

On your queiry on recursive dir ....

AFAIK, using my technique NO! Essentially each "*/"
represents one level of directory structure.  It is
possible to get the second level  with "ls -d */*/"
and third  level with "ls -d */*/*/", but  in these
cases directories with lesser number of levels will
NOT be listed,  and multiple aliases will be needed
... definitely not elegant.

I would support Karsten <kmself@ix.netcom.com> here.
Use the "tree" program. Thats what its meant for.
  
I use two aliases for  directory  listings from the
present working directory:

a) alias lsd='ls -d */'         
b) alias lst='tree -d | less'   

Other options would be to use dedicated scripts for
the purpose, or filter a  ls -R output through grep
or sed etc. Some  suggestions have  already come on
the list in this regard.

HTH

USM Bish

On Tue, Oct 17, 2000 at 10:13:44PM +0000, Thomas Halahan wrote:
> your solution is more elegant than what i have put together with a
> find call.  however how could you get it to list recursively?
> 
> i have tried
> 
> ls -1 -R -d */
> 
> tom
> 
> On Tue, 17 Oct 2000, USM Bish wrote:
> > 
> > alias lsd="ls -d */" should do your job !
> > 
> > USM Bish
> > 
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
> 



Reply to: