logrotateohjelmalla
Logrotateohjelma, often simply called logrotate, is a Unix and Linux utility that automates the management of large, long‑running log files. Its primary purpose is to rotate, compress, delete, and email logs to keep disk usage under control while preserving sufficient historical data for troubleshooting and compliance. The program reads configuration files, typically found in /etc/logrotate.conf and /etc/logrotate.d/, where administrators specify which log files to handle, rotation frequency (daily, weekly, monthly), the number of rotated logs to retain, and actions to perform after rotation, such as restarting a service.
Logrotate operates by renaming the current log file, creating a fresh file of the same name, and
Introduced with the Linux 2.2 kernels in the early 1990s, logrotate has become an industry standard on