🎁 New User? Get 20% off your first purchase with code NEWUSER20 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

Find
A powerful command for searching files and directories based on various criteria like name, size, type, and modification time.
Package Manager
A tool that automates the process of installing, updating, configuring, and removing software packages.
Sed
A stream editor for filtering and transforming text, commonly used for find-and-replace operations in files.
Chroot
A mechanism that changes the apparent root directory for a process and its children, creating an isolated filesystem view.
Linux Bridge
A software-based network switch in the Linux kernel that connects multiple network interfaces at Layer 2, enabling VM and container networking.
Daemon
A background process that runs continuously on a system, typically providing services like web serving or logging.
View All Linux Terms →