wat should be done if /var/log/messages file is deleted
Hi,
By mistake I deleted /var/log/messages file.Will that harm the OS or the softwares running on linux in any way????????If so,is there any method by which I can avoid it. Thank you, Sree Deepya. |
It will not cause any harm; however, you obviously lost any information in the file. To prevent this happening in the future you may wish to log on as a non-privileged user or use the "-i" switch on rm.
|
Quote:
|
You'll need to:
# touch /var/log/messages Be more careful with root, please. |
Never run the box as root. Run all apps as a user. only use root when you absoluteley have too. and then get out of it.
Be oh so careful when you are running as root !! |
Add this to root's .bashrc file
Code:
alias rm='rm -i' |
If you've deleted a file that's being written to you probably should
restart syslogd, otherwise it'll keep pushing log messages into what will disappear next time the logs get rotated. Cheers, Tink |
All times are GMT -5. The time now is 02:10 AM. |