From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f4ff0b364602a2dc X-Google-Attributes: gidfee84,public From: Andy Wagg Subject: Re: Listing Directories (without files!) Date: 2000/03/20 Message-ID: <38D679CE.5FDF2532@bigfoot.com>#1/1 X-Deja-AN: 600054484 Content-Transfer-Encoding: 7bit References: X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@virgin.net X-Trace: news2-win.server.ntlworld.com 953579985 62.252.37.90 (Mon, 20 Mar 2000 19:19:45 GMT) Organization: Virgin Net Usenet Service MIME-Version: 1.0 NNTP-Posting-Date: Mon, 20 Mar 2000 19:19:45 GMT Newsgroups: comp.unix.osf.osf1 Why not use find: find / -type d -print This should give you a nice list of all the directories. Andy. "Mark M." wrote: > Currently I use the following command on our Digital Alphastation 4/166's > (with OSF/1) to obtain a listing of subdirectories without the associated > clutter of file names: > > ls -p | grep "/" > > This command uses "-p" to place a "/" at the end of each directory name, > (but not file names), then searches for and displays only those entries with > a "/", yielding a display of only the subdirectories. I do this because the > directory has about 50,000 files in it and I have no other brief method of > displaying just the directory names. > > QUESTION: IS THERE A BETTER WAY? Is there an "ls" option that does this? > > Mark M.