VIM macro to add changelog entry within spec file

Editing spec files is somewhat time-consuming repetitive task. It’s good to add a change log entry every time you rebuild srpm package. One can do it typing it all over the times. Someone can use the maco. I do use this one: nmap ,cl /%changelog<CR>:r!date +'\%a \%b \%d \%Y'<CR>0i* <ESC>$a David Hrbáč <my@email.tld> - Simply add this line to you .vimrc file. Comments: Yury V. Zaytsev - Oct 4, 2011There is a plugin for it: http://www. [Read More]
rpm  vim 

Remove old kernels

Simple way to remove all but one kernel:

if [ $(rpm -q kernel | wc -l) -gt 1 ]; then rpm -e $(rpm -q kernel | sed '$d'); fi
if [ $(rpm -q kernel-smp | wc -l) -gt 1 ]; then rpm -e $(rpm -q kernel-smp | sed '$d'); fi
centos  rpm