vin*_*oth 16 linux
如何在Linux上找到当前目录的所有直接子目录?
ypn*_*nos 19
使用echo */.
echo */
说明:
ls
peo*_*oro 8
如果您只需要获取子目录列表(无需关心要使用的语言/工具)find,那么您需要的命令.
find
它能够在目录树中找到任何内容.
如果你立即意味着你只需要子目录,而不是孙子-maxdepth选项就可以了.然后-type会让你指定你只是在寻找目录:
-maxdepth
-type
find YOUR_DIRECTORY -type d -maxdepth 1 -mindepth 1
归档时间:
15 年,1 月 前
查看次数:
16781 次
最近记录:
6 年,11 月 前