help-cfengine
[Top][All Lists]
Advanced

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

Renaming file using wildcard


From: Paul Dlug
Subject: Renaming file using wildcard
Date: Mon, 6 Oct 2003 11:51:26 -0400

How can I rename a file using a wildcard?

I'm running solaris and I lock down all of our systems using the solaris security toolkit which renames some files with their original name and a datestamp:

eg:
/etc/snmp/conf/snmpdx.rsrc renamed to /etc/snmp/conf/_snmpdx.rsrc.JASS.20030815124232

I know that there will only be one file that matches the wildcard but I have no way of precomputing the date stamp. Is there any way I can do something like: (below obviously doesn't work)

copy:
  /etc/snmp/conf/_snmpdx.rsrc.JASS.* dest=/etc/snmp/conf/snmpdx.rsrc

Or can this be accomplished in an editfiles block by using some sort of an include with a wildcard that will insert the renamed file into a new file created as the name I want?



Thanks,
Paul





reply via email to

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