Re: /var/log/messages
On Friday, February 21, 2003 13:39, Richard Beri wrote:
> My /var/log/messages and messages.0 are getting very large. messages
> alone is almost 500 meg. Is is safe to delete these files (I don't
> need to read any back error messages). My syslog is also reaching
> 500 meg ais that safe to be deleted. Will they be auto-created again?
For next time, you might like to discover a utility called logrotate.
It will regularly archive and/or delete old log files and set up new
empty ones in their place.
I think you can empty a file (while preserving its permissions) by
overwriting it with the empty string:
# echo "" > /var/log/messages
Hope this helps
--
Michael Wardle
Adacel Technologies
Reply to: