grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

commit b45f2845a44c8dab00f450694752c7130117abb7
parent ca61e05e8e6405328a476ca9870e1ca3373ed16d
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 10 Jan 2019 15:56:23 +0000

logrotate page and link

Diffstat:
Mtechnology/linux/general/index.md | 1+
Atechnology/linux/general/logrotate.md | 28++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/technology/linux/general/index.md b/technology/linux/general/index.md @@ -6,6 +6,7 @@ - [dmidecode](dmidecode) - [i3lock](i3lock) - [journalctl](journalctl) +- [logrotate](logrotate) - [man_pages](man_pages) - [mpd](mpd) - [mpv](mpv) diff --git a/technology/linux/general/logrotate.md b/technology/linux/general/logrotate.md @@ -0,0 +1,28 @@ +# logrotate + +[guide and functions][] + +## file example +``` +/var/log/example.log { + weekly + size 500M + missingok + rotate 5 + compress + copytruncate + notifempty +} +``` + +test using debug mode +``` +logrotate -d /etc/logrotate.d/example +``` + +run manually +``` +logrotate -f /etc/logrotate.d/example +``` + +[guide and functions]: https://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/