On Sun, Jun 13, 2010 at 3:24 PM, Peng Yu <[email protected]> wrote: > I know that 'find' start from a dir then recursively check subdirectories. > > But I have an application, in which I need to check the start > directory first then check the parent directory (I want to control > whether to go to sibling directories) then the grandparent directory > (I want to control whether to go to sibling directories of the parent > directory). > > More general, thinking of the filesystem as a tree, I want to traverse > it starting from a non-root node and need some flexible rules to rule > out certain branches. I'm wondering if such a tool is available > somewhere?
I'm not aware of one, but such a thing would be relatively simple to code in Python or even Perl (which is probably why nobody wrote a dedicated tool). James.
