From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,f4ff0b364602a2dc X-Google-Attributes: gidfee84,public From: Knut =?iso-8859-1?Q?Helleb=F8?= Subject: Re: Listing Directories (without files!) Date: 2000/03/20 Message-ID: <38D68B81.4DFD654D@merkantildata.no>#1/1 X-Deja-AN: 600082958 Content-Transfer-Encoding: 8bit References: <38D679CE.5FDF2532@bigfoot.com> X-Accept-Language: en,no Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: news-abuse@online.no X-Trace: news1.online.no 953584682 130.67.201.208 (Mon, 20 Mar 2000 21:38:02 MET) Organization: Telenor Online Public Access MIME-Version: 1.0 NNTP-Posting-Date: Mon, 20 Mar 2000 21:38:02 MET Newsgroups: comp.unix.osf.osf1 Hi ! I've always been doing ls -ld *|grep '^d' with success. Think this is faster than find if you're only wanting to investigate the current directory. You could also do a find -prune .... where prune makes the find command not descending into subdirectories (if I remember right). Knut Helleb� Merkantildata ASA Bergen, Norway Andy Wagg wrote: > > 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.