Unix 命令:ls -d */ 但我只想查看文件夹,而不是文件

Unix command: ls -d */ but i only want to see the folders, not the files

我在UNIX环境下。我想要实现的是导航到一个目录,并打印出它的所有文件夹。例如:

/user/Mike/data/

在上面的目录中,有50个文件夹。我只想看到这个目录中的 50 个文件夹。我使用了以下命令:

ls -d */

但是,它也会显示该目录中的所有文件。有没有办法让我们使用上面的命令消除文件列表?

2个我能想到的选项:

ls -l | grep ^d,但这统计了输出。

find * -maxdepth 0 -type d