deleted /var/log/messages

deleted /var/log/messages

Post by rc_coll.. » Fri, 24 Mar 2000 04:00:00



whoops- I deleted /var/log/messages.

how do I get it back?

how do you trim logs down?
I have heard of some apps that do it.

Any recommendations?

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

deleted /var/log/messages

Post by Lonni J. Friedma » Fri, 24 Mar 2000 04:00:00



> whoops- I deleted /var/log/messages.

> how do I get it back?

> how do you trim logs down?
> I have heard of some apps that do it.

> Any recommendations?

The following should both recreate & empty /var/log/messages:
/dev/null > /var/log/messages

 
 
 

deleted /var/log/messages

Post by Christian Capit » Fri, 24 Mar 2000 04:00:00


hello,

couldn't you
        touch /var/log/messages
?




> > whoops- I deleted /var/log/messages.

> > how do I get it back?

> > how do you trim logs down?
> > I have heard of some apps that do it.

> > Any recommendations?

> The following should both recreate & empty /var/log/messages:
> /dev/null > /var/log/messages

 
 
 

deleted /var/log/messages

Post by Patrici » Fri, 24 Mar 2000 04:00:00



>whoops- I deleted /var/log/messages.

>how do I get it back?

>how do you trim logs down?
>I have heard of some apps that do it.

>Any recommendations?

>Sent via Deja.com http://www.deja.com/
>Before you buy.

Hi
You can type touch /var/log/messages.
the logfiles are trimmed by the cronjob logrotate.
--
HTH :)
Patricia

http://www.crosswinds.net/~beginnerslinux
Red Hat Linux release 6.0 (Hedwig)
Kernel 2.2.5-15
 12:47pm  up 46 min,  2 users,  load average: 0.07, 0.23, 0.49
Thu Mar 23 12:47:09 CET 2000

 
 
 

deleted /var/log/messages

Post by Villy Kru » Sat, 25 Mar 2000 04:00:00



Quote:

>The only proper way to empty a log-file is to simply write nothing to it,
>cat /dev/null > /var/log/messages
>You cannot delete it since logging would be halted if no log-file were to
>exist for the logging program to write to.

You can, though, delete the name, and the file will then be deleted
as soon as syslogd is restarted or gets an SIGHUP signal.  Of cours,
by deleting the name to the file no-one can open the file anyway.

If you delete the file and do "killall -HUP syslogd" then a new log file
will be created.  Unlike syslogd on some other unix systems the version
included with linux will create the log files as needed.

Villy

 
 
 

deleted /var/log/messages

Post by Bill Unr » Sun, 26 Mar 2000 04:00:00



>whoops- I deleted /var/log/messages.
>how do I get it back?

You cannot.
However youcan start again
touch /var/log/messages.

Quote:>how do you trim logs down?

You do not. The usual way is to move the logs to say /var/log/messages.0
and then touch /var/log/messages.

Quote:>I have heard of some apps that do it.

It is built in to Redhat in /etc cron.daily/logrotate
Quote:>Sent via Deja.com http://www.deja.com/
>Before you buy.

 
 
 

1. Deleting /var/log/messages...

What is the proper method for deleting the /var/log/messages logfile?  I
know I read it somewhere and now can't find the reference.

Finally, what is the best way to setup ftpd so that it can see my CD-ROM?  I
am assuming that I should place a link in /home/ftp/pub pointing to the
mount point on the CD-ROM.  Is this correct?  Is so, how do I do this?

TIA,

Charles

2. Linux and at66?

3. deleted /var/log/messages and it doesn't reappear

4. SunScreen and NAT (not working)

5. How large can /var/log/messages and /var/log/syslog get ?

6. Is there a Unix timeout utility???

7. How to close /var/log/syslog and /var/log/messages..

8. Oki 4w printer

9. /var/log/messages deleted!

10. ATAPI cd-rom creates many, many logs in /var/log/messages

11. /var/log/messages with size of 0 and no logs are written !?

12. logs not in /var/log/messages