question on logrotate

In some /etc/logrotate.d files i see the size parameter set like this: size=+1024k and in others its set as e.g “size +4096k” and in still others its “size 10M”
What is the “=+” and plain “+” before the actual size all about? The man page only talks about using a format like “size 10M” or “size 200k” etc and I couldn’t find anything via google either

I cant find any info on the “=+” or "+"part


AFAICS, the ‘=+’ syntax is possibly a deprecated syntax being used by some package maintainers for whatever reason – it’s definitely not mentioned in the current logrotate man pages or the package’s ReadMe documentation …

Submitting a Bug Report to openSUSE won’t help either – you’ll get redirected to the appropriate package maintainers …

I suspect that, some code reading of the package’s source will be the only way to shed some light on this issue – assuming there’s some comments at the affected lines …


Looking into the code, in the source “config.c” at line #1143 there’s a call to the logrotate internal function “isolateValue” which seems to strip the “=+” from the configuration string being analysed. Once that’s done, only the subscripts k, K, M and G are considered for the value of “size”, “minsize” and “maxsize” …

There aren’t any relevant comments in the code …

ok, so the ‘size 5M’ style is the standard we should use from this point forwards
I though I would post my logrotate.d/ (from my Tumbleweed system) as an example, looks like things could be cleaned up there as far as size goes)
Its interesting that they support ‘k’ but ‘m’ (‘M’ and ‘G’ are ok but not’ m’ and ‘g’)
Thanks for looking into this!

My current logrotate.d/

# grep size /etc/logrotate.d/*
/etc/logrotate.d/boinc-client:    size +4096k
/etc/logrotate.d/dracut:    size 30k
/etc/logrotate.d/lighttpd:    size=+4096k
/etc/logrotate.d/lighttpd:    size=+1024k
/etc/logrotate.d/mcelog:    size=+2048k
/etc/logrotate.d/net-snmp:   size=+1024k
/etc/logrotate.d/pbl:    size +4096k
/etc/logrotate.d/rsync:    size=+1024k
/etc/logrotate.d/samba:    size=+1024k
/etc/logrotate.d/samba:    size=+1024k
/etc/logrotate.d/snapper:    size 10M
/etc/logrotate.d/syslog:    size +4096k
/etc/logrotate.d/wpa_supplicant:    size +4096k
/etc/logrotate.d/wtmp:    size=+400k
/etc/logrotate.d/xdm:    size=+4096k
/etc/logrotate.d/    size 10M
/etc/logrotate.d/    size 10M
/etc/logrotate.d/    size 10M