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 :

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

Thanks for any advice.

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.


Since the file is over 300 Mb

If I just do: cat maillog

it will take ages to get to the end :frowning:

Is there a way to display the last line ?

I have just started learning the Bash commands.

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