LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2019, 05:18 PM   #1
BigPalabra
LQ Newbie
 
Registered: Nov 2018
Posts: 2

Rep: Reputation: Disabled
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.
 
Old 04-13-2019, 11:31 PM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,464

Rep: Reputation: 915Reputation: 915Reputation: 915Reputation: 915Reputation: 915Reputation: 915Reputation: 915Reputation: 915
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] libperl.so.5.18.2 Error log in kern.log file mahi_nix Ubuntu 2 06-18-2014 07:12 AM
Log rotate not rotate newFreeBSD Linux - Server 13 09-12-2013 08:59 PM
kernel log format in /var/log/kern.log sinu_nayak2001 Linux - Newbie 2 10-07-2009 08:34 AM
how to shrink and manually rotate log bangsters Linux - General 9 09-20-2009 01:57 PM
is it possible that hardware support decreased from kern 2.4 to 2.6? (and other kern servnov Linux - Newbie 3 11-11-2004 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration