# Reducing var/log/ size

**URL:** <https://forums.interworx.com/t/reducing-var-log-size/12698>\
**Category:** General Inquries\
**Tags:** logrotate\
**Created:** [July 13, 2010, 3:18am UTC](https://forums.interworx.com/t/reducing-var-log-size/12698 "2010-07-13T03:18:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nils](https://forums.interworx.com/letter_avatar_proxy/v4/letter/n/d6d6ee/32.png) [@Nils](https://forums.interworx.com/u/Nils)\
**Post date:** [July 13, 2010, 3:18am UTC](https://forums.interworx.com/t/reducing-var-log-size/12698/1 "2010-07-13T03:18:50Z")

</div>

Hi, I’m sorry I have yet another newbie question.

These files on /var/log/ are far bigger than the rest:  
? 329M secure.1  
? 392M secure.2  
? 91M secure.3  
? 80M secure.4  
? 86M btmp

Is there a way to either reduce or limit their size?

---

<div class="post-metadata">

**Author:** ![Fr3d](https://forums.interworx.com/user_avatar/forums.interworx.com/fr3d/32/27_2.png) [@Fr3d](https://forums.interworx.com/u/Fr3d)\
**Post date:** [July 13, 2010, 8:16am UTC](https://forums.interworx.com/t/reducing-var-log-size/12698/2 "2010-07-13T08:16:57Z")

</div>

Judging by the .1 and .2 files, you already have logrotate installed.  
So I’d suggest configuring it to gzip each file after rotating.  
Uncomment line 12 in the default (for RHEL/CentOS anyway) /etc/logrotate.conf, like this:

```auto
# uncomment this if you want your log files compressed
compress

```

You can also change how often the files are rotated; both for individual files and/or as a global setting. More often would lead to smaller files 🙂

---

<div class="post-metadata">

**Author:** ![Nils](https://forums.interworx.com/letter_avatar_proxy/v4/letter/n/d6d6ee/32.png) [@Nils](https://forums.interworx.com/u/Nils)\
**Post date:** [July 14, 2010, 1:12am UTC](https://forums.interworx.com/t/reducing-var-log-size/12698/3 "2010-07-14T01:12:35Z")

</div>

Fr3d, thank you so much for your help. That’s exactly what I was looking for 🙂
