Cfengine configuration directory

How do I rename files in cfengine?

Relevant classes: any

Prior to version 2.1.0 there was no specific command for renaming files, other than to disable them or rotate them.

As of version 2.1.0 you can simply use the dest= option to disable.


disable:

 /tmp/bla dest=bla2

 /tmp/sub/ex1 dest=/tmp/ex2

Note that you cannot rename across filesystems. If you want to rename across filesystems, you can also use copy and then tidy afterwards to rename across filesystems:

copy:

 /fs1/file dest=/fs2/file define=tidysource


tidy:

 tidysource::

   /fs pattern=file age=0

Back to documentation