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
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine