Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `ls *(.)` shows "just files", what shows "just folders"?
- X-seq: zsh-users 16239
- From: Michael Shick <mfshick@xxxxxxxxx>
- To: TJ Luoma <luomat@xxxxxxxxx>
- Subject: Re: `ls *(.)` shows "just files", what shows "just folders"?
- Date: Sun, 14 Aug 2011 21:40:05 -0400
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4KK5Oa+ylRDyKxWQPDlG/2r15BGh5G7gn1jSULmTJTo=; b=bpW+MgPMvUnpGFsndoxB2oBrv1q9FK8dNtxYGETmqxjeLvyufw/i3PRfh1pYEuG/Hn q1w9HP0YBwt9SIMUmTluEnFXrt/ssWNPJeioB0WhD1fQlMrKt3NW6BqfwrhAhubgwZWD 9u9g53y67uhR6e3wQkj1SpfxLXXbGDGarE6Kc=
- In-reply-to: <CADjGqHvT1KXunrpCF2ssMLAkbF_ugw=MybzpqcAq3Zv9hHthKA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHvT1KXunrpCF2ssMLAkbF_ugw=MybzpqcAq3Zv9hHthKA@mail.gmail.com>
*(/) 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