LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

logrotate

manages log files by rotating, compressing, removing, and mailing them

TLDR

Force rotation manually
$ sudo logrotate --force [/etc/logrotate.conf]
copy
Debug mode - show what would happen without making changes
$ logrotate --debug [/etc/logrotate.conf]
copy
Verbose rotation
$ sudo logrotate --verbose [/etc/logrotate.conf]
copy
Use a custom state file
$ sudo logrotate --state [/var/lib/logrotate/status] [/etc/logrotate.conf]
copy
Log verbose output to file
$ sudo logrotate --verbose --log [/var/log/logrotate.log] [/etc/logrotate.conf]
copy

SYNOPSIS

logrotate [options] configfile_

DESCRIPTION

logrotate manages log files by rotating, compressing, removing, and mailing them. It prevents logs from consuming excessive disk space and is typically run daily via cron.

PARAMETERS

-f, --force

Force rotation even if conditions are not met
-d, --debug
Debug mode; show what would happen without making changes
-v, --verbose
Verbose output
-s, --state FILE
Use alternate state file (default: /var/lib/logrotate/status)
-l, --log FILE
Log verbose output to file
--mail COMMAND
Use specified command to mail logs

INSTALL

sudo apt install logrotate
copy
sudo dnf install logrotate
copy
sudo pacman -S logrotate
copy
sudo apk add logrotate
copy
sudo zypper install logrotate
copy
brew install logrotate
copy
nix profile install nixpkgs#logrotate
copy

CAVEATS

Configuration files in /etc/logrotate.d/ are included by the main config. The state file tracks when each log was last rotated. Typically run daily via cron or systemd timer.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid