# Specify size in kilobytes with logrotate

**URL:** <https://www.ruby-forum.com/t/specify-size-in-kilobytes-with-logrotate/113387>\
**Category:** Rails\
**Created:** [August 30, 2007, 4:32pm UTC](https://www.ruby-forum.com/t/specify-size-in-kilobytes-with-logrotate/113387 "2007-08-30T16:32:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![worthspending](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/f4b2a3/32.png) [@worthspending](https://www.ruby-forum.com/u/worthspending)\
**Post date:** [August 30, 2007, 4:32pm UTC](https://www.ruby-forum.com/t/specify-size-in-kilobytes-with-logrotate/113387/1 "2007-08-30T16:32:51Z")

</div>

Has anyone successfully configured logrotate using the size in  
kilobytes??

I have broken this thing down as far as I can.

- I setup a test server
- I am running logrotate manually

I noticed while running it in debug mode:  
rotating pattern: “/pathtologs/log/\*.log” 1048576 bytes (5 rotations)  
empty log files are rotated, only log files \>= 5120 bytes are rotated,  
old logs are removed

the first line states: 1048576 bytes  
and the second line states: 5120 bytes

The log files are definitely larger than 5k. This has to be a bug. I  
can absolutely get everything to work if I specify in M (Megabytes),  
but, not in kilobytes.

Anyone with similar experience??

I really want to rotate my web server logs when they reach 500k.
