Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    what is will happen if I rm the log file???????


    what is will happen if I rm the log file?
    /home/virtual/site.com
    cd var
    cd log
    cd httpd
    ls
    access_log access_log.03-27-05 ....etc

    what is will happen if I rm the log file?

    rm -R /home/virtual/site.com/var/log

  2. #2
    Depends what is writing the file. If you remove the file, you might want to reload apache to make sure that it continues to write to that location. Otherwise, apache might stop logging cause its logfile handle is no longer valid and returns errors. However, if it is a logging facility that is writing to the file, then it may be more capable of gracefully handling deleted log files. It is recommended that you clobber the files instead.

    cat > file.log
    Control+C

    cat > file2.log
    Control+C

    etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •