Re: Keeping a set amount of detail logs



Matt Alexander wrote:
> Right, I'm familiar with logrotate.  The problem is that FreeRadius is
> rotating the logs already

  No, you said that the server is "creating new logs every day".  That
means the detail filename has a date in it. (%Y, %m, etc.)

  If you don't want it to create a new file every day, then configure
the filename to have a name that doesn't include the date.

> and I don't know of a way to get logrotate to
> just keep track of a set number of logfiles that it doesn't rotate
> itself.  ie., "keep 10 logfiles only"

$ ls -c | tail -n +11

  Will sort files in the directory by creation time, and then chop off
the first 10.  What's left is the oldest ones, that you can deleted.

  Alan DeKok.



This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.