๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Linux Intermediate

What is Logrotate?

A utility that manages automatic rotation, compression, and removal of log files to prevent disk space exhaustion.

Logrotate runs via cron and handles log file management. Configuration in /etc/logrotate.d/ specifies rotation frequency (daily, weekly), retention count, compression, and post-rotation scripts.

Options include size-based rotation, date-based naming, copying vs moving, and custom scripts for restarting services after rotation. Without logrotate, log files would grow indefinitely and fill disk space.

Related Terms

RAID
Redundant Array of Independent Disks โ€” a technology combining multiple physical drives into a single unit for performance, redundancy, or both.
Strace
A diagnostic tool that traces system calls and signals made by a process, useful for debugging and performance analysis.
Journalctl
A command-line tool for querying and viewing logs collected by systemd's journal logging system.
Ulimit
A command that sets or displays resource limits for user processes, such as maximum open files or memory usage.
Procfs (/proc)
A virtual filesystem in Linux that provides an interface to kernel data structures, exposing process and system information as files.
Crontab Syntax
The time specification format used in cron job scheduling, with five fields defining minute, hour, day of month, month, and day of week.
View All Linux Terms โ†’