Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

My Cron job is not running and i want to see what's problem in the syslog.

But that log is only showing current date only ,

Is there any way to keep logs for the last 10 days?

share|improve this question
up vote 3 down vote accepted

The logs are most likely being rotated by the logrotate process. Look in /etc/logrotate.conf. You should see something like this:


rotate 1

Change that to:


rotate 10

You could also do something like this to keep 4 weeks of logs:


rotate 4
share|improve this answer
i want to keep logs in one file only like in syslog for 1 month. how can i do that – John Apr 29 '10 at 0:58
Keeping more then a couple of days in a single file is a really bad idea for any server out on the internet, as there's a bunch of things that people can do to cause your server to log junk. Having logrotate keep logs longer is ok. man logrotate should help. – LapTop006 Apr 29 '10 at 14:22

Yesterdays log is /var/log/syslog.1. They are rotated daily about 6 in the morning. Previous days logs are syslog.2.gz... Use zless or zgrep to look at the compressed logs.

Data is likely in /var/log/messages as well. This is rotated weekly, and has four weeks of old logs.

share|improve this answer

Your Answer


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