1

How can I rotate many log files into a different subdirectory per rotation?

view story
linux-howto

http://serverfault.com – I have a directory with many log files, all of which I would like to rotate daily. For organizational purposes I would like to be able to move the rotated logs into a different directory (or subdirectory) named by date, keeping the last week of logs. I can use logrotate to achieve most of this by roatating the files in-place or even move them to a single different directory using the olddir directive but I'm having trouble finding a solution for making individual sub-directories per rotation. How can I achieve this?: Logs to rotate: /var/log/example/* Desired target directories (keeping a w (HowTos)