LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need to rotate manually or force the rotation of the file [I]kern.log[/I] (https://www.linuxquestions.org/questions/linux-newbie-8/need-to-rotate-manually-or-force-the-rotation-of-the-file-%5Bi%5Dkern-log%5B-i%5D-4175652103/)

BigPalabra 04-13-2019 05:18 PM

Need to rotate manually or force the rotation of the file [I]kern.log[/I]
 
Hi,

I just forced the rotation of file sys.log with the command:

Code:

sudo logrotate -vf /etc/logrotate.conf
Is it there an equivalent command for the file kern.log, or another method to do it ???

I know that I can empty kern.log but I do not want to, I need to compress it immediately.

Thx in advance.

PS: Sorry for my english, not native.

berndbausch 04-13-2019 11:31 PM

If you create an entry for kern.log under /etc/logrotate.d, the same command should do the trick. Just copy the sys.log config (or config for any other log file) and adapt it to kern.log.


All times are GMT -5. The time now is 07:08 PM.