*BSD News Article 46690


Return to BSD News archive

Xref: sserve comp.unix.misc:17632 comp.unix.admin:30363 comp.unix.bsd:16675 comp.unix.programmer:26937 comp.unix.questions:66533 comp.unix.shell:23546
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!univ-lyon1.fr!jussieu.fr!ens-cachan.fr!news
From: Vincent Zoonekynd <zoonek@Yoko.ENS-Cachan.Fr>
Newsgroups: comp.unix.misc,comp.unix.admin,comp.unix.bsd,comp.unix.programmer,comp.unix.questions,comp.unix.shell
Subject: Re: A Unix command to obtain directory name only
Date: 11 Jul 1995 14:29:49 +0200
Organization: SNEPA
Lines: 12
Sender: zoonek@ens-cachan.fr (Vincent Zoonekynd)
Message-ID: <9wspodijb6.fsf@carmen.ens-cachan.fr>
References: <3tk3dc$4ml@rcp6.elan.af.mil>
NNTP-Posting-Host: carmen.ens-cachan.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
In-reply-to: Jay J Oh's message of 7 Jul 1995 19:54:20 GMT
X-Attribution: Vincent
X-Newsreader: (ding) Gnus v0.88

>>>>> «Jay», Jay J Oh <OHJ%CSCADPS@mhs.elan.af.mil> wrote:

Jay> I am trying to invoke a unix command to obtain only directory names 
Jay> listing for a given path.  I tried using 'ls -d *', but this includes 
Jay> files also.  I also tried 'find -type d . -print'  but this command 
Jay> recursively list all the subdirectories, which I don't want.

With zsh

ls -d */

-- Vincent