Laslo7
11-02-2001, 12:05 PM
I have a file that is created daily via logrotate, access.log, logrotate names the file access.log.1,access.log.2,access.log.3 and so on. I would like to write a shell script to run as a cron job to rename the access.log to (todaysdate)access.log, ie, 11022001access.log. How would one go about doing this. Commands I figure I will need, date and mv are there any others?
Any pointers or hints to get me started, as this will be the second shell script I have ever written.
AJ
Any pointers or hints to get me started, as this will be the second shell script I have ever written.
AJ