可以“找到”或任何其他工具搜索文件宽度优先? [英] Can 'find' or any other tool search for files breadth-first?

查看:124
本文介绍了可以“找到”或任何其他工具搜索文件宽度优先?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我知道一个文件不是很深,但是一个非常密集的子目录不允许我找到我想要的文件。

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.

可以< a href =http://www.gnu.org/software/findutils/manual/html_mono/find.html =nofollow noreferrer> find (或任何其他工具)使用breadth-第一次搜索?

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屋!

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