Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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 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.