[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find starting from leaf rather than root

From: Eric Blake
Subject: Re: find starting from leaf rather than root
Date: Mon, 14 Jun 2010 08:59:37 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.4

On 06/13/2010 09:17 AM, James Youngman wrote:
> On Sun, Jun 13, 2010 at 3:24 PM, Peng Yu <address@hidden> 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).

tw looks like it might have enough of the kitchen sink to be able to
filter directories based on contents of the directory, maybe.

It still remains to be seen whether the next revision of POSIX will
require tw, but it still seems like it would be an interesting project
to add to findutils.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]