Autor Thema: Log files in /var/log  (Gelesen 203 mal)

Offline RVRoadTrip

  • Nano
  • **
  • Beiträge: 50
  • Opencaching.US
    • Opencaching.US
Log files in /var/log
« am: 19. August 2011, 18:25:11 »
Some of these take up a large amount of disk space. Can any of the older ones be safely removed?  Which ones should not be removed?

Some are in sub folder /apache2 and some are compressed (.gz files).

Thanks!
« Letzte Änderung: 19. August 2011, 18:34:02 von RVRoadTrip »
Jerry
Former OC US Admin

Offline Tiger

  • Large
  • ******
  • Beiträge: 2561
Re: Log files in /var/log
« Antwort #1 am: 19. August 2011, 20:23:03 »
Logrotate should clean up the /var/log directory automatically. Old logs get first compressed (.gz) and then deleted after a while. How long the different logs are kept can be adjusted in /etc/logrotate.conf and /etc/logrotate.d/*

If you have any logfiles which are not handled by logrotate, you can add a your own scripts in /etc/logrotate.d. "man logrotate.conf" will give you further information and some examples.

Offline RVRoadTrip

  • Nano
  • **
  • Beiträge: 50
  • Opencaching.US
    • Opencaching.US
Re: Log files in /var/log
« Antwort #2 am: 19. August 2011, 20:32:19 »
Awesome, thanks.
Jerry
Former OC US Admin