At 09:57 PM 3/3/99 -0600, you wrote:
>Hi,
>
>I hope this subject attracts some gurus.
>
>I have a webserver which runs in such a way that if delete the log 
>file, it will not be re-created unless I restart the web server.  I 
>have other webservers which will recreate the log file if I delete 
>it.  Oh well (I prefer the latter).
>
>So I am aware that the server is looking for an inode and not a file 
>name.  When I want to reset the logs I copy them and then I do a
>
>tail log > log

A better way might be 
# echo > log

>and everything keeps running without any trouble.
>
>Recently someone else messed with the log file and for 4 days the 
>logs were not appended to the log file.  Where are they?  Is it 
>possible to recover them?

As far as I know, they are in limbo (written to /dev/null).

>Is their an advantage to this method as opposed to the other method 
>where I can delete the log file and the server will recreate it?
What I do to save/reset logs is this:
mv log log.new_name
killall -HUP httpd

The killall -HUP will restart the web server and it will then
recreate the log files.


Matt Soffen
==============================================
Boss    - "My boss says we need some eunuch programmers."
Dilbert - "I think he means UNIX and I already know UNIX."
Boss    - "Well, if the company nurse comes by, tell her I said 
             never mind."
                                       - Dilbert -
==============================================
____________________________________________________________________
--------------------------------------------------------------------
 Join The NEW Web Consultants Association FORUMS and CHAT:
   Register Today at: http://just4u.com/forums/
Web Consultants Web Site : http://just4u.com/webconsultants
   Give the Gift of Life This Year...
     Just4U Stop Smoking Support forum - helping smokers for
      over three years-tell a friend: http://just4u.com/forums/
          To get 500 Banner Ads for FREE
    go to http://www.linkbuddies.com/start.go?id=111261
---------------------------------------------------------------------

Reply via email to