Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: `ls *(.)` shows "just files", what shows "just folders"?



Hi Tj,

I'm not sure that this is optimal but I use:

   ls -d *(/)

Tristan
On Sun, Aug 14, 2011 at 09:08:39PM -0400, TJ Luoma wrote:
> Somewhere along the way I learned that
> 
> 	ls *(.)
> 
> will tell 'ls' to only show files (not links, not directories)
> 
> Is there a similar command which would show _only_ directories?
> 
> (I've been using `find * -maxdepth 0 -type d` but I assume this is
> 'more efficient')
> 
> TjL

-- 
Tristan Webb
PhD Student

Department of Computer Science
and Complexity Science Doctoral Training Centre
Warwick, UK
Tel: 024 765 73789 (Work)
Tel: 01926334727 (Home)
Mobile: 077 082 19078
Website: http://www.warwick.ac.uk/go/tristanwebb
Identi.ca: ksira



Messages sorted by: Reverse Date, Date, Thread, Author