仅列出 UNIX 中的目录 [英] Listing only directories in UNIX

查看:19
本文介绍了仅列出 UNIX 中的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想列出指定路径中的目录(ls 没有这样的选项).另外,这可以用单行命令完成吗?

I want to list only the directories in specified path (ls doesn't have such option). Also, can this be done with a single line command?

推荐答案

试试这个 ls -d */ 列出当前目录中的目录

Try this ls -d */ to list directories within the current directory

这篇关于仅列出 UNIX 中的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆