小编kuz*_*roo的帖子

如何在长路径中找到第一个丢失的目录?

想象一下,我有一条不存在的路径:

$ ls /foo/bar/baz/hello/world
ls: cannot access /foo/bar/baz/hello/world: No such file or directory
Run Code Online (Sandbox Code Playgroud)

但可以说/foo/bar 确实存在。有没有一种快速的方法可以让我确定那baz是路径中的断点?

我正在使用 Bash。

ls shell bash directory

16
推荐指数
2
解决办法
1067
查看次数

标签 统计

bash ×1

directory ×1

ls ×1

shell ×1