Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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

like image 445
flybywire Avatar asked Jul 06 '09 13:07

flybywire


1 Answers

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.

like image 141
unwind Avatar answered Sep 24 '22 23:09

unwind