title: How to use logrotate to compress files older than 1 day
body: <p>I've have a list of files below which I wants logrotate to compress if its a day old. So I'm expecting <strong>TRACE_03.log, TRACE_07.log</strong>, been compressed as it is more than 24 hrs</p>
  
  <pre><code># ls -ltr
  total 2083312
  -rw-r--r--. 1 root root 198176768 Mar 18 01:30 TRACE_03.log
  -rw-r-----. 1 root root 198176768 Mar 19 17:19 TRACE_07.log
  -rw-r-----. 1 root root 467324318 Mar 19 23:59 TRACE_01.log
  -rw-r-----. 1 root root         0 Mar 20 09:27 TRACE_05.log
  -rw-r-----. 1 root root         0 Mar 20 09:27 TRACE_06.log
  -rw-r-----. 2 root root 634809893 Mar 20 19:45 TRACE.log
  </code></pre>
  
  <p>Now for my logrotate.conf</p>
  
  <pre><code># see "man logrotate" for details
  # rotate log files weekly
  weekly
  
  # keep 4 weeks worth of backlogs
  rotate 4
  
  # create new (empty) log files after rotating old ones
  create
  
  # use date as a suffix of the rotated file
  dateext
  
  # uncomment this if you want your log files compressed
  #compress
  
  # RPM packages drop log rotation information into this directory
  include /etc/logrotate.d
  
  # no packages own wtmp and btmp -- we'll rotate them here
  /var/log/wtmp {
      monthly
      create 0664 root utmp
          minsize 1M
      rotate 1
  }
  
  /var/log/btmp {
      missingok
      monthly
      create 0600 root utmp
      rotate 1
  }
  </code></pre>
  
  <p>For my Trace.log config</p>
  
  <pre><code>/var/log/traces/TRACE_*.log{
      daily
      missingok
      compress
      nodateext
      rotate 1
      maxage 1
  }
  </code></pre>
  
  <p>What am I missing in my configuration that it does not worked here?</p>