Alex Rivera | Logout

Can 'find' or any other tool search for files breadth-first?

Asked 2009-07-06T13:19:02.037
36

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.

Can find (or any other tool) look for files using breadth-first search?

Edit
Report

1 Answer

18

Yes, sort of.

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.

answered 2009-07-06T13:24:05.183

Your Answer