[juneau-lug] Re: ls directories

  • From: Jamie <jamie@xxxxxxxxxxxxxxxxx>
  • To: juneau-lug@xxxxxxxxxxxxx
  • Date: Fri, 04 Feb 2011 21:36:12 -0900

As you suggest, I can get what I want piping grep:
ls -dl /var/log/* | grep ^d

But why should I need to do this?  It's hard to believe there is a bug 
in ls.  Yet if this is a feature, where is it documented?


On 02/04/2011 07:35 PM, woolsherpahat wrote:
> maybe something like this?
>
> ls -Rl /var | grep '^d'
>
> On Fri, Feb 4, 2011 at 8:04 PM, Jamie<jamie@xxxxxxxxxxxxxxxxx>  wrote:
>> ls , the most basic, simple command we have, right?  Can someone
>> enlighten me on listing directories, using the -d option.  Here is what
>> I find
>>
>> ls -dl /*        works, lists just the directories
>> ls -dl /var/*        works
>> ls -dl /var/log/*        lists files and directories -HUH?
>>
>> In fact, anytime I ask for more than 2 levels of depth, it includes
>> files.  I don't want them listed.  Is there a way?
>> ------------------------------------
>> The Juneau Linux Users Group -- http://www.juneau-lug.org
>> This is the Juneau-LUG mailing list.
>> To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
>> word unsubscribe in the subject header.
>>
> ------------------------------------
> The Juneau Linux Users Group -- http://www.juneau-lug.org
> This is the Juneau-LUG mailing list.
> To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
> word unsubscribe in the subject header.
------------------------------------
The Juneau Linux Users Group -- http://www.juneau-lug.org
This is the Juneau-LUG mailing list.
To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
word unsubscribe in the subject header.

Other related posts: