如何在* N * X中列出目录名称而不列出其内容?


12

如果我简单地ls指定一个文件名模式,例如ls A*,对于与该模式匹配的目录,它将进入目录并给出完整的清单,但是我如何才能只获得清单的列表./以及内部目录的名称,却不能他们的内容?

Answers:




0
ls -l | grep '^d' will list only directories in the '.' current directory
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.