O Logrotate é projetado especificamente para lidar com essas tarefas e funciona muito bem. Eu sugiro que você use isso.
Agora, vamos olhar (e se necessário - corrigir) seu arquivo logrotate, usando as páginas de manual finas fornecidas pelos mocinhos do Ubuntu (link ).
Sua versão:
# File: /etc/logrotate.d/.test
/var/log/*log{
size 0
hourly
nocreate
copytruncate
rotate 0
}
Eu sugiro que você use o abaixo:
# File: /etc/logrotate.d/.test
/var/log/*.log{
# the rotate option sets how many times the log files are rotated before being removed. Setting it to 0 means - delete right away (you'll only have the original)
rotate 0
# the size option sets what size should a file reach before being rotated - I'm setting it to 10MB, but you can change it as it pleases you
size 10M
# The size option will prevail this option. The daemon will run hourly, but won't rotate the log file until it reaches 10 MB
hourly
# this option fits your requirement not to create new log files
nocreate
# delete rotated log files older than 0 days
maxage 0
# truncate the original file rather creating new one
nocopytruncate
}