I want to create a shell script for logrotating. following are my requirement.
want to archive the log files to a particular directory lets(/usr/local/jboss-5.10..GA/server/archive/log) older than 2 months .
want to delete logs older than 2 months from archive directory. the format of log is server.log.2015-08-11
server.log.2015-02-06 server.log.2015-02-07 server.log.2015-02-08 server.log.2015-02-09 server.log.2015-02-10 server.log.2015-02-11 server.log.2015-02-12 server.log.2015-02-13 server.log.2015-02-14 server.log.2015-02-15
the log files are present on below path
cd /usr/local/jboss-5.1.0.GA/server/pymidol/log/
logrotate
an option?man logrotate
for detailsjboss
create the dated log files? If so, you don't need logrotation asjboss
already does that; you simply need archiving. Please clarify in your Question.