The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files.
C Shell M4 Other
Latest commit bd26388 Dec 7, 2016 @kdudka kdudka weekly: trigger the rotation more predictably
... by ignoring the exact time.  If the (absolute) day counter
advances by 7+ days since the last rotation, a new rotation is
triggered.

Additionally, introduce an optional argument of the 'weekly' directive
to trigger the rotation on a selected day of the week.  If the argument
is omitted, default to Sunday to preserve backward compatibility.

Closes #93
Permalink
Failed to load latest commit information.
examples Add logrotate service and timer for systemd Oct 7, 2016
test Add globbing patterns to supplement taboo extensions Nov 24, 2016
.gitattributes .gitattributes: add merge=union policy for changelog merges Sep 23, 2016
.gitignore Add config.guess and config.sub to gitignore Jan 23, 2017
.travis.yml configure.ac: avoid using AM_EXTRA_RECURSIVE_TARGETS Dec 8, 2016
CONTRIBUTING.md Create CONTRIBUTING.md Sep 26, 2016
COPYING Changed .spec versions to 2.4 Jul 9, 1997
ChangeLog.md changelog: update 3.11.0 links (#91) Dec 5, 2016
INSTALL test: let tests run on 'make distcheck' Aug 3, 2016
Makefile.am Remove config.h, move options to configure.ac Jan 23, 2017
Makefile.legacy Makefile.legacy: a new name for legacy Makefile Aug 3, 2016
README.HPUX 3.6.5 Jun 20, 2002
README.Solaris Patch from Fidelis Assis <fidelis@embratel.net.br> to add first/last Nov 15, 2002
README.md add compilation help documentation (#97) Dec 14, 2016
autogen.sh distribute README.md and do not distribute empty files Aug 4, 2016
basenames.c - new upstream release Nov 12, 2005
basenames.h - new upstream release Nov 12, 2005
config.c weekly: trigger the rotation more predictably Jan 23, 2017
configure.ac Remove config.h, move options to configure.ac Jan 23, 2017
log.c Support logging to syslog by using '-l syslog' Jan 7, 2016
log.h Support logging to syslog by using '-l syslog' Jan 7, 2016
logrotate.8.in weekly: trigger the rotation more predictably Jan 23, 2017
logrotate.c weekly: trigger the rotation more predictably Jan 23, 2017
logrotate.conf.5 new man page for config, exit if config file too large, change cron s… Sep 25, 2009
logrotate.h weekly: trigger the rotation more predictably Jan 23, 2017
logrotate.spec.in spec: Add %license for COPYING file Oct 19, 2016
queue.h Add queue.h to fix compilation with musl-libc Feb 10, 2015
upload-release.sh use dist-xz; cleanup upload-release.sh (#92) Dec 5, 2016

README.md

logrotate

The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size.

Download

The latest release is:

Previous releases:

Git checkout

You can also obtain code by using git checkout:

git clone https://github.com/logrotate/logrotate.git -b master

Replace master with branch or tag you intend to checkout

Verify and unpack

After downloading the tarball and .asc signature file, check the signature:

Get Kamil's PGP key rsa4096/72A37B36 (almost any keyserver will do if pgp.mit.edu is temporarily unavailable):

$ gpg --keyserver pgp.mit.edu --recv-key 992A96E075056E79CD8214F9873DB37572A37B36

and verify the PGP signature on the distribution tarball:

$ gpg --verify logrotate-3.11.0.tar.xz.asc logrotate-3.11.0.tar.xz

If succesful your GPG output should look like this:

gpg: Signature made Fri 02 Dec 2016 08:30:39 AM EST
gpg:                using RSA key 873DB37572A37B36
gpg: Good signature from "Kamil Dudka <kdudka@redhat.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 992A 96E0 7505 6E79 CD82  14F9 873D B375 72A3 7B36

You may then unpack the tarball:

$ tar -xJf logrotate-3.11.0.tar.xz

Notice that git tags are signed with same key:

$ git tag --verify 3.11.0

Compiling

Obtain source either by Downloading it or doing Git checkout.

Install dependencies for Debian systems:

apt-get update
apt-get install make autoconf libtool libpopt-dev xz-utils

Install dependencies for Fedora/CentOS systems:

yum install make autoconf automake libtool popt-devel xz

Compilation (autoreconf is optional if you obtained source from tarball):

cd logrotate-X.Y.Z
autoreconf -fiv
./configure
make

Patches and Questions

Open issues or pull requests on GitHub.