Re: List (sub) directories

From: Michael Wang (mwang_at_unixlabplus.com)
Date: 02/16/05


Date: Wed, 16 Feb 2005 04:39:49 GMT

In article <1108495408.063443.176890@o13g2000cwo.googlegroups.com>,
 <50295@web.de> wrote:
>Is there a command like ls that lists only the sub-directores of the
>current dirctory? I am not interested in files

for i in *; do
  [[ -d $i ]] && print -- "$i"
done

-- 
For low fair air travel, take Independence Air - http://www.flyi.com/.
Michael Wang * http://www.unixlabplus.com/ * mwang@unixlabplus.com


Relevant Pages

  • Re: List (sub) directories
    ... >Is there a command like ls that lists only the sub-directores of the ... >current dirctory? ... For low fair air travel, ...
    (comp.unix.shell)
  • Re: List (sub) directories
    ... > Is there a command like ls that lists only the sub-directores of the ... > current dirctory? ...
    (comp.unix.questions)
  • Re: List (sub) directories
    ... > Is there a command like ls that lists only the sub-directores of the ... > current dirctory? ...
    (comp.unix.shell)
  • Re: List (sub) directories
    ... > Is there a command like ls that lists only the sub-directores of the ... > current dirctory? ...
    (comp.unix.shell)
  • Re: List (sub) directories
    ... > Is there a command like ls that lists only the sub-directores of the ... > current dirctory? ...
    (comp.unix.questions)