
Ich bin nicht sicher, warum diese bestimmte Datei nicht rotiert wird. Es ist kein Verzeichnis. Irgendwelche Ideen?
Die Größe der Firewalld-Datei:
$ ls -alh /var/log
-rw-r--r--. 1 root root 134M Jan 31 13:49 firewalld
Die relevante Strophe aus /etc/logrotate.conf:
/var/log/firewalld {
hourly
copytruncate
maxsize 1M
missingok
rotate 8
compress
notifempty
nomail
noolddir
}
Der ausgeführte Befehl:
$ sudo logrotate -fv /etc/logrotate.conf
rotating pattern: /var/log/firewalld forced from command line (8 rotations)
empty log files are not rotated, log files >= 1048576 are rotated earlier, old logs are removed
No logs found. Rotation not needed.
set default create context
Die resultierende Größe der Firewalld-Datei:
$ ls -alh /var/log
-rw-r--r--. 1 root root 134M Jan 31 13:49 firewalld
Antwort1
Die Antwort habe ich in diesem Beitrag gefunden:https://stackoverflow.com/posts/43398163/timeline
Offenbar ist der Schalter -v derselbe wie der Schalter -n. Mit anderen Worten lässt der Schalter „v“ nicht zu, dass logrotate Protokolle rotiert.