Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So... I discovered that my wtmp file was really big today, like 2.1GB.

I deleted it and recreated it, but...

Is there any way I can tell logrotate to well, rotate the log?

share|improve this question
up vote 3 down vote accepted

Check man logrotate

Logrotate figures out which files need to be rotated based on the settings in /etc/logrotate.conf.

I think the default for wmtp is

/var/log/wtmp {
    create 0664 root utmp
        minsize 1M
    rotate 1

If that's not in there, you can add it. If it's not sufficient, you can change it, or add a "size = whatever" directive to tell it to rotate whenever the size exceeds the set value.

Logrotate should be in the /etc/cron.daily. If it's not running often enough, you can call logrotate -f to force it.

share|improve this answer
So, I checked this out, and it all checks out. I would think a wtmp file of like 2.1GB would be something logrotate will deal with. And its in /etc/cron.daily. Nevertheless, thanks for the info satanicpuppy. – J. Polfer May 20 '10 at 21:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.