Query regarding deleting an huge log file.

Discussion in 'Site & Server Administration' started by Gigacore, Jan 13, 2010.

  1. #1
    Hi,

    I just found a large sized stat log file in this dir on my VPS:


    /home/httpd/xyzfolder/stats

    The file name is: xyzsite-custom_log

    It is 6.6 GB in size and is eating up my disk space usage. Is it okay to delete this file and free the space on the disk?
     
    Gigacore, Jan 13, 2010 IP
  2. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Um, yes.

    Google for 'rotate server logs' and the name of the software you're running as a server os. There should be ann option to save your logs every day and start over fresh. That way you don;t get these huge logs.

    hope this helps
    -drmike
     
    theapparatus, Jan 13, 2010 IP
  3. Gigacore

    Gigacore Active Member

    Messages:
    359
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Ok. Thank you!
     
    Gigacore, Jan 13, 2010 IP
  4. new

    new Peon

    Messages:
    1,433
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #4
    or just gzip it to save space
     
    new, Jan 13, 2010 IP
  5. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Um, no.

    If it's an active log and you gzip it, the webserver will have to unzip it to access it, write to it and then zip it back up. That would be a waste.

    One the Debian and FreeBSD boxes we have, the log rotation script we use the previous days logs are gzipped when they are rotated and saved.
     
    theapparatus, Jan 13, 2010 IP