From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Filter journal data by criteria

Filter journal data by criteria - Linux Tutorial

From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)

Start my 1-month free trial

Filter journal data by criteria

- [Instructor] Logs need to be rotated so they don't get too large. The configuration file for log rotate is /etc/logrotate.conf. Type into a terminal sudo space les space -N space /etc/logrotate.conf and hit Enter. We can see that the very top uncommented line is weekly. This is the log rotate schedule. The next uncommented line says rotate space four. This is how many weeks worth of logs to keep. Line number nine instructs to create new log files after the old ones have been rotated. This is good to have turned on because some services will only log to a file that already exists. Line number 12 says to use a date in the suffix of the rotated file name. Line 15 will compress the log files if uncommented. The last line we'll look at is line number 18. Line 18 includes all configuration files and /etc/logrotate.d. If we wanted to create a log rotation scheme for specific filters, you could create a config file…

Contents