A Generation Lost in the Bazaar - Poul-Henning Kamp article

Chris F.A. Johnson chris-E7bvbYbpR6jSUeElwK9/Pw at public.gmane.org
Wed Aug 22 22:43:55 UTC 2012


On Wed, 22 Aug 2012, phiscock-g851W1bGYuGnS0EtXVNi6w at public.gmane.org wrote:

>
>>>> Why is it that the ls command doesn't
>>>> have an option of showing only directories?
>>>
>>> ls -d */
>>>
>>>
>> Sure, but why do I have to add the cryptic */ to this? Why not just ls -d?
>>
>> P.
>
> What happens when you do ls -d? You get '.'
>
> According to the manual entry:
>
> -d, --directory
>              list directory entries instead of contents, and do not
> dereference symbolic links
>
> In other words, if you use ls -d, it tells you 'you are in the current
> directory', or more colloquially: you are where you are. That's not a huge
> amount of information.

    You didn't ask for any more information.

ls -ld

-- 
    Chris F.A. Johnson, <http://cfajohnson.com/>
    Author:
    Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list