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

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



On 2011-08-15 03:41:37 +0200, Vincent Lefevre wrote:
> On 2011-08-14 21:08:39 -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?
> 
> ls -- *(/)
> 
> See "Glob Qualifiers" in the zshexpn man page.

I forgot: you probably also want the -d ls option: ls -d -- *(/)

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



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