From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20653 invoked by alias); 15 Aug 2011 02:05:26 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16239 Received: (qmail 13224 invoked from network); 15 Aug 2011 02:05:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.41 as permitted sender) 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= MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 14 Aug 2011 21:40:05 -0400 Message-ID: Subject: Re: `ls *(.)` shows "just files", what shows "just folders"? From: Michael Shick To: TJ Luoma Cc: Zsh Users Content-Type: multipart/alternative; boundary=001517401858b0bedc04aa815701 --001517401858b0bedc04aa815701 Content-Type: text/plain; charset=ISO-8859-1 *(/) 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" 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 --001517401858b0bedc04aa815701--