Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd prefer for logadm to name files with a YYYYMMDD extensions, instead of the standard .0, .1, .2 ... I'd still want log admin to keep the last 'n' log rotations.

Is this possible, or am using the wrong tool for application log rotation? I'm rotating files only based on date, and not by size.

share|improve this question
up vote 2 down vote accepted

If you want to keep the last 10 rotations with YYYYMMDD extensions:

logadm -c 10 -t '$file.%Y%m%d' /path/to/file

See also the logadm and strftime manpages.

share|improve this answer
    
The logadmin link is broken, the good one is here: docs.oracle.com/cd/E19683-01/816-0211/816-0211.pdf – Filippo Vitale Apr 19 '12 at 0:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.