LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   i deleted /var/log/syslog and need it back (https://www.linuxquestions.org/questions/linux-desktop-74/i-deleted-var-log-syslog-and-need-it-back-831782/)

Cyberman 09-12-2010 08:06 PM

i deleted /var/log/syslog and need it back
 
#@$%$

I was trying to solve an issue with my dhcpd.conf file, and I was looking through the syslog to see what the issue is. The file was really long, and I was sitting around about 2 minutes before I decided, "ok, f this, I'm going to delete this and rerun the dhcp3-server to get the error again."

I deleted the file, and now I can't get it back. It won't come back after I "/etc/init.d/dhcp3-server restart"

What do I do?

ubuntu 10.04

MS3FGX 09-12-2010 08:16 PM

The syslog file is a log for the entire system, not just the DHCP server. So restarting it won't bring back the file. You need to restart the syslog daemon itself.

For future reference, you should be using tools like grep and tail to just see sections of large log files like that. For example, the command "tail /var/log/syslog" would just show you the last 10 lines of the file (in other words, the things that happened the most recently).

syg00 09-12-2010 08:54 PM

Just do a touch on the syslog, chown, and off you go.
Might need to do "sudo reload rsyslog", maybe not.


All times are GMT -5. The time now is 03:11 PM.