我想写这样的东西:
$ ls **.py
Run Code Online (Sandbox Code Playgroud)
为了获得所有 .py 文件名,递归遍历目录层次结构。
即使要查找 .py 文件,shell (bash) 也会给出以下输出:
ls: cannot access **.py: No such file or directory
Run Code Online (Sandbox Code Playgroud)
有什么办法可以做我想做的事吗?
编辑:我想说明我对 的特定情况不感兴趣ls,但问题是关于 glob 语法。