Web Page Templates Icons, Clipart, Logos
We're sorry but that file doesn't exist.

Aug 03, 2009 07:01 PM

Clearing Log Files on Linux

My secure and messages log files were getting really big, and after analyzing them to see if there was a reason, I decided to clear them out.

To do so, I first typed: cat > messages, then typed a couple of blank lines, and hit control-c to quit. I did the same for the secure log file. This cleared the file, but no new messages were being added to the logs. After kicking myself for being stupid, I searched around and found two important things.

First, it’s easier to clear a file by simply typing “> filename”, and second, the syslog daemon is reponsible for writing to those files. Restarting it restores its ability to write to the file. I restarted it by going to /etc/init.d and running ./syslogd restart

darren

log files | linux


Comments

Name:
Website URL:
Comment:

 

 


 

Visit www.Vauntium.com for more information.

 

 

Resource Links