Subject: bug#14189: ls -d bug ??

From: Assaf Gordon <[email-masked]>
Date: Thu, 11 Apr 2013 16:56:16 -0400

Hello Ray,

Others can provide more detailed information about the rational of the "dot" file,
but regarding your questions:

[email-masked] wrote, On 04/11/2013 02:17 PM:
> Once in a blue moon, a person would like to view the subdirectories of the
> directory you are in, without seeing all the various files.

"find -type d" will list all directories (but will do so recursively).
"find -maxdepth 1 -type d" will list only directories immediately under your current directory.

Since it's "once in a blue moon" (as you've said), I guess there's no "short form" for that.

If you need the extended information that "ls" provides:
  find -maxdepth 1 -type d -print0 | xargs -0 ls -ld

<...>

> 
> Interestingly, the MAN page seems to indicate that this is the way to go,
> however, regardless of what directory you are in, if you type
> 
> ls -d
> 

One use-case for "-d" is to show the information about the directory, instead of the *content* of the directory.

Compare:
  ls -l /etc
vs.:
  ls -ld /etc

HTH, 
 -gordon