I assume this is relatively easy but my shell scripting isn't that great so I'm hoping to get some help.
I have a task which runs every hour and appends its output to a log file. I'd like to move that log file every night so that the script has an empty one to work with and the logs are easier to look at when I need to check them.
So I'd like a script which moves
/var/log/my.log
to
/var/log/my.log.2 or my.log.yyyy.mm.dd or something.
How can I do that pretty easily?
