This time Vox <[EMAIL PROTECTED]> 
becomes daring and writes:

> This time James Sparenberg <[EMAIL PROTECTED]> 
> becomes daring and writes:
>
>> ls isn't broken... at least as I read the man page. It should display
>> everthing in the directory as if it where a file and not expand
>> directorys ... if you cd to dir X it and do ls -d it returns ./   As for
>> coreutils.... this isn't in 9.0 or 8.2 .... Texstar has it .. but I
>> can't find it on my disks there ls comes from fileutils....  cooker may
>> also have it as well.  Behavior may have changed for it.
>
>   Ok, just tried it on a pure 9.0 box (I forgot this wasn't cooker@ :)
>   and I get normal results...that is, directories only.
>
> [vox@rebeca vox]$ rpm -qf /bin/ls
> fileutils-4.1.11-5mdk
> [vox@rebeca vox]$ ls -d ../*
> ../rebeca/  ../test/  ../vox/
> [vox@rebeca vox]$ 
>
>   So, again, WFM, don't know what the problem can be...you may want to
>   check out your aliases, in case something there is getting in the
>   way...it's the only thing that comes to mind right now.

    Uhm...nevermind that...I think I know what the problem here
    is...my mind wasn't in gear till now...what -d actually does is
    *not* limit the listing to directories, it just tells ls to not
    recurse into directories when you do an ls on * or on anything
    that ends up being a dirname. So...your idea is wrong, and so was
    my interpretation of it and my memory of -d :)

    What you want to do would need, I think, either some grep'ing or
    some find'ing, something like

    find /the/dir/you/want/to/find/in/ -type d 

    That'll find all directories under that directory. You can then
    grab the result and stick it in a var :)

    Vox

-- 
Think of the Linux community as a niche economy isolated by its beliefs.  Kind
of like the Amish, except that our religion requires us to use _higher_
technology than everyone else.       -- Donald B. Marti Jr.

Attachment: msg63494/pgp00000.pgp
Description: PGP signature

Reply via email to