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

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



*(/) is the glob you're looking for.  To just list the folders and not their
contents, you'd use `ls -d *(/)`.
On Aug 14, 2011 9:35 PM, "TJ Luoma" <luomat@xxxxxxxxx> 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


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