help-cfengine
[Top][All Lists]
Advanced

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

Re: tidy (CFengine v2.0.0)


From: David Douthitt
Subject: Re: tidy (CFengine v2.0.0)
Date: Tue, 10 Sep 2002 14:30:05 -0500
User-agent: Mutt/1.4i

On Tue, Sep 10, 2002 at 07:54:28PM +0200, Mark.Burgess@iu.hio.no wrote:

> These are rejected because you are using regular expressions
> where only wildcards are allowed. If you want to use a regex,
> you need to define a filter.

I tried that.  It didn't generate any errors but it also didn't
suggest any deletions either.  Here's the code:

filters:

    { ssh_tempdir
        NameRegex: ".*ssh-[A-Za-z][A-Za-z][A-Za-z][A-Za-z][0-9][0-9][0-9][0-9]"
        Type:      "dir"
        Result:    "NameRegex.Type"
    }

    { sh_temp1
        NameRegex: ".*sh[0-9][0-9]*.[0-9]"
        Result:    "NameRegex"
    }

    { sh_temp2
        NameRegex: ".*[0-9]*.sh"
        Type:      "reg"
        Result:    "NameRegex.Type"
    }

    { sam_ktemp
        NameRegex: ".*sam_kinfo*"
        Type:      "reg"
        Result:    "NameRegex.Type"
    }

tidy:

    /tmp filter=sh_temp1 age=7

...and the relevant output of cfagent -nv:

*********************************************************************
 Main Tree Sched: tidy pass 1 @ Tue Sep 10 14:26:42 2002
*********************************************************************

---------------------------------------------------------------------
Tidying Spool Directories
---------------------------------------------------------------------

---------------------------------------------------------------------
Tidying by directory
---------------------------------------------------------------------

Directory /tmp
No home patterns to search
Job start time set to Tue Sep 10 14:26:42 2002

...and the directory contents:

# ls -1d /tmp/* | grep ".*sh[0-9][0-9]*.[0-9]"
/tmp/sh13047.1
/tmp/sh13047.2
/tmp/sh13047.3
/tmp/sh13386.1
/tmp/sh13386.2
/tmp/sh13386.3
/tmp/sh14157.1
/tmp/sh14157.2
/tmp/sh14157.3
/tmp/sh14874.1
/tmp/sh14874.2
/tmp/sh14874.3
/tmp/sh255.1
/tmp/sh255.2
/tmp/sh255.3

...What am I missing?  I'm sure it must be something simple, but
I don't know what it is....





reply via email to

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