system
April 19, 2011, 11:19am
1
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.
Eric
April 19, 2011, 1:49pm
2
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
system
April 19, 2011, 2:12pm
3
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.
Eric
April 19, 2011, 2:50pm
4
You can display the last few lines of a file using the “tail” command.
-Eric