After updating your centos, you might see the old kernel in the grub menu. This is how you remove the old kernel on centos (if you want to) :
- to ensure you really have old kernel installed, use
rpm -q kernel to see it.
- Install yum-utils with
yum install yum-utils
- remove it using
package-cleanup --oldkernels --count=2. the
--count option means how many kernels you want left
To make it always limited amount of kernels left after update, edit
/etc/yum.conf and set
installonly_limit. If you want always left 2 kernels then use
Ever trying to remove a lot of file like this ?
[root@blah]# ls -l log/ | wc -l
It wont work if you just remove it with rm because there will be an error message (i.e.
/bin/rm: Argument list too long). So how to remove it ?? I use this command to remove it
[root@blah]# find ./ -name ‘msg.*’ | xargs rm -fv
msg.* becasue the filenames I want to remove begin with
msg.. You can vary it depend on your need.
source of inspiration
Today my fight with sudo is over, I finally can conquer it. Once this error come to me when I using sudo on centos :
Fatal error (bad version): sudo: symbol lookup error: sudo: undefined symbol: audit_log_user_command
After quite long searching for the solution finally got it today. It turns out a simple solution, In my case after I upgrade the audit and it libs sudo works fine. So my mistakes is I’m using the newest sudo but I didn’t upgrade the audit-libs.
Ha, a simple solution but makes me very confused