jojo_angelov
Posts: 38
Joined: Mon Jan 06, 2014 1:59 am

Can I delete syslog or any other log, and let it re-create

Fri Nov 07, 2014 1:07 am

So I am thinking of ways to be able to delete logs after a long time of use of the Rpi. I might have one running for over a year and I want to make sure there is enough space. What would be the best way to clear logs?

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can I delete syslog or any other log, and let it re-crea

Fri Nov 07, 2014 6:47 am

There's already a package called logrotate to do that. It's driven from /etc/logrotate.conf and the files in /etc/logrotate.d
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

trevatxtal
Posts: 8
Joined: Fri Oct 03, 2014 7:08 am
Location: South Devon UK
Contact: Website

Re: Can I delete syslog or any other log, and let it re-crea

Fri Nov 07, 2014 8:07 am

All plain text logs can be loaded into an editor.
Then delete all and save empty file or if you prefer part of the file.
I like to keep today's entry's but discard all others.
Trev

Return to “General discussion”