0

What I am trying to achieve is archive all log files if number of them in a folder exceed some number. Is it possible somehow ? EDITED: to be more detailed, I'll have possible several thousands of files coming hourly. So I would like archive them at some point to keep it clean. The best way would be to check no of files and total size, so if any of these condition pass, I would tar them

  • Welcome to the Serverfault. Logrotate can do different things according to number of files however, to be able to craft a good and suitable answer, can you please detail your question a little? E.g.: How the log files are created by the service (date, size, pid, etc.)? What's the name of the service? How many log files are we talking about? – bayindirh Apr 06 '20 at 11:02
  • Hi.please see updated question, hope it's more clear now – Adam Bator Apr 06 '20 at 11:08
  • Thanks. Are your files coming through `rsyslog`, `syslog-ng` or another syslog compatible remote logging service? If yes, I may devise something more sinister and useful. – bayindirh Apr 06 '20 at 11:10

0 Answers0