Remove Automaticamente os Kernel Antigos do GRUB
Publicado por William Lima Reiznautt 23/08/2006
[ Hits: 6.860 ]
Esse Script faz uma varedura no arquivo /etc/grub.conf e remove o Kernel mais antigos deles, e define o Default = 0, Bom para quem atualiza varias maquinas, obs: esse Script esta configurado para o FEDORA CORE 4, se precisar rodar em outra versao, é so alterar o 'egrep'
#!/bin/bash ## Desenvolvido por www.vivaolinux.com.br/~willreli ## ## Data Desenvolvimento 15/03/06 ## ## Atualização 15/03/06 ## ##Manter DEFAULT=0 sed -e 's/^default=[^0]/default=0/' /etc/grub.conf > /tmp/testeker.txt && cat /tmp/testeker.txt > /etc/grub.conf ##Apaga entrada não SMP sed -e '/^title Fedora Core.*FC4)$/,+3d' arqaux/grub2.conf > /tmp/testeker.txt && cat /tmp/testeker.txt > ~/scripts/arqaux/grub2.conf ##Remove Kernel Mais Antigo if [ $(egrep -c '^title Fedora Core' arqaux/grub2.conf) -gt 1 ]; then arm=$(cat arqaux/grub2.conf | egrep '^title Fedora' | sort | head -1 | awk '{print $4}') sed -e '/'$arm'$/,+3d' /etc/grub.conf > /tmp/testeker.txt && cat /tmp/testeker.txt > /etc/grub.conf ./rmkernel.sh fi cat /etc/grub.conf
BACKUP para micros com Windows XP utilizando o share administrativo ( C$ )
Instalação do Microsoft Edge no Linux
Liberar cliente SSH no firewall
Nenhum comentário foi encontrado.
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Descritores de Arquivos e Swappiness
Solução rápida para o problema do Network Manager conectar mas não navegar
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit