Ready to be published? LXer is read by around 350,000 individuals each month, and is an excellent place for you to publish your ideas, thoughts, reviews, complaints, etc. Do you have something to say to the Linux community?
In Linux every activity is monitored and logged in to their respective logs in /var/log folder. The depth of log information is dependent on the log configuration we did it in /etc/logrotate.d and we have to rotate them all the time to control how much space they use.
In Linux every activity is monitored and logged in to their respective logs in /var/log folder. The depth of log information is dependent on the log configuration we did it in /etc/logrotate.d and we have to rotate them all the time to control how much space they use. When ever we install packages, the package copies its log configuration file to /etc/logrotate.d folder so that that specific application log files can be rotated.
Normally in any Linux/Unix machine logs are rotated daily(/etc/cron.daily/) or weekly(/etc/cron.weekly) or monthly(/etc/cron.monthly) depending where we kept our logrotate script. My logrotate script is located in /etc/cron.daily which indicate my logs are rotated daily. One more facter logrotate depends when rotatting logs is log "status" file which is located at /var/lib/logrotate/status which stores when we rotated logs last time.
Let us see how we can rotate logs manually instead of waiting for hours.
Example1: In order to check what happens when we rotate log files manually before actually executing them can be done in debug mode(-d).
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help