(imported topic written by SystemAdmin)
I want to back a backup file of a configuration file before I make changes to it and would like to use a date stamp, for example:
copy /opt/app/app.conf /opt/app/app.conf.12162010
(imported topic written by SystemAdmin)
I want to back a backup file of a configuration file before I make changes to it and would like to use a date stamp, for example:
copy /opt/app/app.conf /opt/app/app.conf.12162010
(imported comment written by NoahSalzman)
q: now
A: Thu, 16 Dec 2010 09:15:47 -0800
q: current date
A: Thu, 16 Dec 2010
q: year of current date
A: 2010
q: month of current date
A: December
q: month of current date as two digits
A: 12
q: day_of_month of current date
A: 16
q: (month of it as two digits & day_of_month of it as string & year of it as string) of current date
A: 12162010
Then you use Relevance substitution to do something like:
copy /opt/app/app.conf /opt/app/app.conf.{(month of it as two digits & day_of_month of it as string & year of it as string) of current date}
(imported comment written by SystemAdmin)
Thank you… That’s exactly what I needed