bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14189: ls -d bug ??


From: address@hidden
Subject: bug#14189: ls -d bug ??
Date: Thu, 11 Apr 2013 13:17:05 -0500 (CDT)

To: The most gracious and brilliant authors of the ever useful ls command.
(The title is quite heartfelt - no sarcasm intended).

I have to wonder.  I've been using *nix of various kinds for nigh unto 15 years.
 I ran into an issue today that I've seen many times, and it still irks me.
 I've simply never taken the time to write to anyone about it.  I assumed
someone would report it and it would be magically fixed in the next version, but
it never seems to.

I've also seen several people elude to the same problem in forums, etc.

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.

Since you can use the ls command to view the files and directories that are
contained in your pwd, one would THINK the intuitive method would be to type ls
-d.

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

you don't get the expected result, but rather you get:

.

Which is like ls is telling you, "Yup, you are in a directory!"

Wull DUH, like I couldn't figure out that I was in a directory.  If I wanted to
get more info on that I'd type pwd !

tree -dx ALMOST gives you the desired outcome, except it includes all the
subdirectories of the subdirectories.

ls -d, I would think, would tell you the same data that ls would tell you, minus
the individual files.
(In  other words - show all the data with a "d" in the permissions, but not show
the ones that don't have a "d" in the permissions).

I'm not afraid to admit I may be missing the whole point (pardon the pun).  Is
it me, or am I just not understanding the importance of the " . ", and how that
. might change from one directory to another?

WHY does ls -d just give me a dot?  Is  that dot supremely important?  Is there
some reason it can't give me what (it appears) the manual says (and what makes
sense) it should?


Ray Dall
Radio Frequency Engineer
Author: Electronics for Sound Engineers

This email sent via a virus free Linux computer.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]