[Novalug] ls -d
Gary Knott
garyknott@gmail.com
Fri Oct 14 13:24:35 EDT 2016
According to "man ls" the command "ls -d"
should list the filenames and directory names
in my current directory -
(but this is just what the command "ls" unadorned does,)
in fact "ls -d" just outputs "." Clearly i am
misinterpreting what -d means. (Or the man page writer
was stingy and uncharitable.)
How do I use ls to just list the directory names in my
current working directory (and nothing else)? Or
is it impossible?
[I would like to avoid "find" as it is too
complex to master easily.
e.g. "find -type d -maxlevel 1" is too hard.
(or is it maxdepth, or just depth?)
[note "du ." solves a nearby problem but not with the
"level 1" constraint.]
gary knott garyknott@gmail.com
More information about the Novalug
mailing list