Try something like this: filters:
{ wwwfoo Owner: "www" Group: "foo" FromAtime: "tminus(0,0,10,0,0,0)" # relative "ago" from now ToAtime: "inf" Type: "reg" Result: "Owner.Group.Type" } Quoting "John S. J. Anderson" <[EMAIL PROTECTED]>: > > I'm having a filter problem. > > My objective is to set up a 'tidy' action that removes files from > /tmp that haven't been accessed in 10 days, that are owned by either > 'www' or group 'foo'. (That's "older than 10 days AND ( owner=www OR > group=foo )".) > > So I figured I'd be using something that looks like this: > > tidy: > class_of_machines_that_i_want_this_for:: > /tmp pat=* age=10 filter=wwwfoo r=inf rmdirs=true inform=true > > filters: > { wwwfoo > Owner: "www" > Group: "foo" > } > > In order to test that this wouldn't do something crazy, I put in the > filter above, and added this temporary stanza to 'files': > > files: > class_of_machines_that_i_want_this_for:: > /tmp filter=wwwfoo action=alert r=inf > > Unfortunately, that's alerting on every file under /tmp. > > Clearly, something is wrong with the filter. What, I have no > idea. Other things I have tried: > > { wwwfoo > Owner: "www" > } > > { wwwfoo > Owner: "www" > Group: "foo" > Result: Owner|Group > } > > Version 2.0.7p3; running on Linux. Any help, even if it's just a > pointer to more documentation on filters, would be appreciated. I > can't seem to get my head around how they're supposed to work. > > > thanks, > john. > -- > John S J Anderson, Ph.D. [ Contractor ] +1.301.402.7499 > Chief Penguin Herder & Linux Team Lead, Systems Group, NCBI/NLM/NIH > "Acquire the habit of reading specs and talking to your peers." > - Per Cederqvist, _Version Management with CVS_ > > > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@gnu.org > http://lists.gnu.org/mailman/listinfo/help-cfengine > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Work: +47 22453272 Email: [EMAIL PROTECTED] Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine