I'd like to only the directory
$ ls -d
.
#get . on macos
and the same on centos
[root@iz2ze9wve43n2nyuvmsfx5z ~]# ls -d .
.
I find the solution:
[root@iz2ze9wve43n2nyuvmsfx5z /]# ls -d */
bin/ dev/ home/ lib64/ media/ opt/ root/ sbin/ sys/ usr/
boot/ etc/ lib/ lost+found/ mnt/ proc/ run/ srv/ tmp/ var/
but the manual specify
-d, --directory
list directories themselves, not their contents
What's the reason -d
perform this way?