The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache Logs - Big files

Discussion in 'EasyApache' started by Arvy, Jan 5, 2008.

  1. Arvy

    Arvy Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    92
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello all,

    maybe this is a stupid question, but I prefer to ask to avoid problems :)

    When I:
    root@server [/usr/local/apache/logs]# ls -lia

    I see some HUGE files, default Apache logging, I know.

    7832723 -rw-r--r-- 1 root root 103588911 Jan 6 02:10 access_log
    7832721 -rw-r--r-- 1 root root 246034763 Jan 6 02:10 error_log
    7834413 -rw-r--r-- 1 root root 305358439 Jan 6 02:11 suexec_log

    Question: can I stop Apache, delete the files (to save 600 Mb) and restart?
    Just a "rm"? Or I need to "echo > file" to let them with zero bytes?

    Thank you!
    Arvy
     
  2. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Just delete them AND THEN restart apache/httpd and they will start over empty. I do it all the time.
     
  3. Arvy

    Arvy Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    92
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks nyjimbo! ;)
     
Loading...

Share This Page