Reputation: 123
I can't list directories only with the command:
ls -d
It shows me only the current directory .
, but there are a lot more than that.
I'm using a Linux Mint 18 Sarah.
Upvotes: 1
Views: 4454
Reputation: 2560
Yes, -d
option is strange. I was dissapointed by ls
many times, so I learnt find
. To list non-recursively (-maxdepth 1
) local (.
) directories (-type d
):
find . -type d -maxdepth 1
Upvotes: 1