可以“查找"或任何其他工具搜索文件广度优先吗? [英] Can 'find' or any other tool search for files breadth-first?
本文介绍了可以“查找"或任何其他工具搜索文件广度优先吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有时我知道一个文件不是那么深,但是一个非常密集的子目录不允许我轻松找到我想要的文件.
Sometimes I know a file is not so deep away, but a very dense sub-directory does not allow me to find the files I want easily.
可以find(或任何其他工具)寻找使用广度优先搜索的文件?
Can find (or any other tool) look for files using breadth-first search?
推荐答案
是的,有点.
您可以使用 -depth
选项使其在目录本身之前处理目录的内容.您还可以使用 -maxdepth
选项来限制将向下钻取的目录数量.
You can use the -depth
option to make it process a directory's contents before the directory itself. You can also use the -maxdepth
option to limit how many directories down it will drill.
这篇关于可以“查找"或任何其他工具搜索文件广度优先吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文