Maillog over 300Mb - shouldn't I delete it ?

4 posts / 0 new
Last post
#1 Tue, 04/19/2011 - 06:19
Anonymous

Maillog over 300Mb - shouldn't I delete it ?

Hi,,I am looking at my mailllog files and notice that

I have file var/log/maillog

and another one :var/log/messages

Both are now over 300MB.

Isn't this a waste of resorces ?

Do I need to keep these huge files ?

Does the system auto compress them/ archive them at some point ?

I have some other files : var/log/maillog.1 var/log/maillog.2 var/log/maillog.3 var/log/maillog.4

Are these archived files ? they are about 5Mb each.

Thanks for any advice.

Tue, 04/19/2011 - 08:49
andreychek

By default, you system should automatically rotate mail logs for you. How often that is depends on your distro... it's generally once a day or once a week.

You could take a look at maillog.1 to see when the last time it was rotated. Look at the timestamp at the end of the logs.

-Eric

Tue, 04/19/2011 - 09:12 (Reply to #2)
Davvit

Since the file is over 300 Mb

If I just do: cat maillog

it will take ages to get to the end :(

Is there a way to display the last line ?

I have just started learning the Bash commands.

Tue, 04/19/2011 - 09:50
andreychek

You can display the last few lines of a file using the "tail" command.

-Eric

Topic locked