New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

how to empty all logfiles

Got problems with your B2 or B3? Share and get helped!
Post Reply
squadra
Posts: 96
Joined: 19 Sep 2008, 09:02

how to empty all logfiles

Post by squadra »

I'm learning ssh because of the bubba2 :-) but can't find the command to empty all .log files. I know i'm not creating much space with it but i don't need the log file content when it is that old ...
carl
Posts: 474
Joined: 07 May 2008, 04:41

Re: how to empty all logfiles

Post by carl »

squadra wrote:I'm learning ssh because of the bubba2 :-) but can't find the command to empty all .log files. I know i'm not creating much space with it but i don't need the log file content when it is that old ...
That is seldom needed, as most logging is done via a system called "logrotate", which takes care of log files not growing too big, and to remove old log files when needed.
Though if you feel you must, the quick and dirty way to truncate a file is as following:

Code: Select all

: > file
/Carl
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
Post Reply