compact log files

Discussion in 'Technical' started by mloradites, Mar 22, 2007.

  1. mloradites

    mloradites New Member

    I am syslogging information from a firewall to my linux box. A perl daemon is parsing this log and inputting the info to a mysql database.

    The log file has already grown to 188MBs+ in a little over a day. I don't need to keep the info in the file as it is parsed immediately upon receipt. Is there a way I can automatically compact the file at the end of each day? If it keeps on going it's just going to be ridiculous.
  2. falko

    falko Super Moderator ISPConfig Developer

    You can do this with logrotate. Take a look at
    man logrotate

Share This Page