I need help to write a script to copy log files.
There are two format of logs:
New files are generated when trace log reaches 20 MB and sytem log reaches 10MB.
Only 5 of these logs (5 for each kind) are allowed to be saved, once there is more than 5 of them, the old files get deleted and replaced by new ones.
Therefore, before they get deleted I need to copy them to a different location so that I can view them later when needed to debug.
Basically, it will look like the following (showing just trace log format, similar with System log):
trace_12.03.05_17.11.20.log trace_12.03.05_17.12.30.log trace_12.03.05_17.13.45.log trace_12.03.05_17.13.23.log trace_12.03.05_17.14.40.log