Log file empty?
Hi to all, one newbie question.
I delete all log dile in /var/log/rm * then pres y for all files, then i delte all in /var/log/httpd/rm * . But now the directory still empty, where is new logs? Thanks |
Welcome to LQ!
You probably need to restart the httpd. Next time you can empty the log by using echo command to send a line into log you want to empty. |
yes, you need to restart httpd (that is for /var/log/httpd) and I think you need to reboot your PC for /var/log (or at least syslog daemon should be restarted).
In general it is not a good idea, because the log files are opened and continuously in use. rm * will not remove them just remove the directory entry, but those files will be still in use. |
Good point pan64, of course the file is still open. BTW, I do not think syslog needs to be restarted, if I recall correctly logrotate does not do it.
Anyhow, instead of emptying log files configure your logrotate to your liking. |
1 Attachment(s)
:) working, thanks guys.
And if want to reboot our server, just using command reboot? |
yes, more or less that works. If you are logged in on GUI there will be also a menu to poweroff/restart
|
I use putty to send only commands.
|
in that case yes, reboot is the command you need.
|
All times are GMT -5. The time now is 02:45 AM. |