Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 09-12-2010, 09:06 PM   #1
Registered: Aug 2005
Distribution: Debian Stable
Posts: 190

Rep: Reputation: 17
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
Old 09-12-2010, 09:16 PM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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).
Old 09-12-2010, 09:54 PM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 13,843

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What those IP's mean in /var/log/syslog ? geropero Linux - Newbie 5 09-04-2009 03:25 PM
/var/log/syslog messages. gbowden Slackware 2 02-25-2006 06:00 PM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 05:03 PM
/var/log/syslog George666 Slackware 4 03-19-2004 08:34 AM
re: where is /var/log/syslog ergo_sum Red Hat 10 11-04-2003 07:27 PM

All times are GMT -5. The time now is 06:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration