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: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: 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: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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”