Mailinglist Archive: opensuse (3149 mails)

< Previous Next >
Re: [SLE] ls not showing directories only
On Fri, 2002-08-02 at 12:08, Togan Muftuoglu wrote:
> I can be brain dead but isn't "ls -d" suppose to show the directories
> only. When I give "ls-d all" I get back is nothing
>
> toganm@earth:~/projects/sfnet/suse/faq_sgml> ls -ld
> drwxr-xr-x 7 toganm users 784 Aug 2 12:31
>
> toganm@earth:~/projects/sfnet/suse/faq_sgml> ls -d
> .
>
> toganm@earth:~> ls --version
> ls (fileutils) 4.1
>
> the info page of ls says
>
> `-d'
> `--directory'
> List just the names of directories, as with other types of files,
> rather than listing their contents
>
> So why do I get nothing when I issue 'ls -d'

One could easily think that the purpose of -d would be to only display
directories, but as I tried the following in a directory with subdirs;

"ls -ad *" I got the normal listing of all files but not the recursive
listings of the subdirs.

"ls -a *" gives me the complete listings of files recursively.


Just my 0.02$

Cheers!
/Adam

> --
>
> Togan Muftuoglu
> Unofficial SuSE FAQ Maintainer
> http://dinamizm.ath.cx
>
>
>
> --
> Check the headers for your unsubscription address
> For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
> Also check the archives at http://lists.suse.com
>
--
-=-=-=-=-=-=-=-=-=-=-=-=-
Adam Johansson
Developer @ MadSci AB
Phone: +46 (0)18 606462
Cell: +46 (0)70 6483901
ICQ: 58187935
Linux User #162881
http://www.madsci.se
-=-=-=-=-=-=-=-=-=-=-=-=-


< Previous Next >
References