Well, you could always do this instead: body file_select modified_over_a_year_ago
{ mtime => irange(ago(1,0,0,0,0,0),now()); file_result => "!mtime"; # modified more than a year ago } On May 21, 2011, at 10:16 PM, Aleksey Tsalolikhin wrote: > The following policy selects files more than a year old (for > modification time). > > Literally, it selects files whose mtime is between 1 year old and 100 years > old. > > Am I missing a more elegant way to do this or is this the right way? > > > bundle agent example > > { > files: > > "/tmp/test_from" > > file_select => modified_over_a_year_ago, > transformer => "/bin/echo DETECTED $(this.promiser) MATCHING FILTER", > depth_search => recurse("inf"); > > } > > ############################################ > > body file_select modified_over_a_year_ago > > { > mtime => irange(ago(100,0,0,0,0,0),ago(1,0,0,0,0,0)); # modified > more than a year ago > file_result => "mtime"; > } > > ############################################ > > body depth_search recurse(d) > > { > depth => "$(d)"; > } > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine