My bash script creates a log file. Now I would like to implement some rotation of the log file.
Say the first time he called somelog.log , the next time you rename it somelog.log.1 and the new log file somelog.log .
The third time, the new log somelog.log is again, but somelog.log.1 is renamed to somelog.log.2 and the old somelog.log to somelog.log.1 .
I would like able to provide a maximum, for example, 5.
This is done earlier (sample script), any suggestions. I appreciate any advice.
file bash logging rotation
John doe
source share