关于"ls",我怎么才能只显示目录(链接目录和隐藏目录除外)

use*_*617 2 unix linux shell

我遇到了关于"ls"这个命令的一些问题

我想只打印没有隐藏或链接的目录

但我用男人来看看解释,但我没找到

如果有一面旗帜,我可以做我想做的事......

谢谢

以下是我要解决的问题......

 4.显示可见的出口

This is two commands: The first command prints "Visible exits: "
-> It must not advance the cursor to the next line.
The second command displays the visible exits and then a period (.).
-> To prevent the linked directories contents from also displaying, you 
will need a flag.
-> Several wildcard patterns will be needed.
-> The period will be the last of these patterns.
   The period means the current directory. But here it will seem, to
   the user, to be a period at the end of a sentence listing visible
   exits.
-> You will need to use a flag to keep the output from being
   sorted (otherwise the period will not stay at the end).
-> With several patterns to search, some may have no matches. That
   is OK, but we don't want to see warning messages. Redirect these.
Run Code Online (Sandbox Code Playgroud)

Tey*_*ras 8

使用ls -d */.这*/是一个通配符,扩展到当前目录中的所有目录(目录结束/).-d告诉ls我列出作为参数而不是其内容给出的目录的名称.