Manutenção básica em partições Linux
Publicado por SuporteTecnicoID (última atualização em 09/04/2017)
[ Hits: 1.826 ]
Homepage: http://www.linux-kdu.com.br
Este simples script usa recursos de verificações e correções de possíveis blocos ruins nas partições Linux, inclusive da possibilidade de abrir partições quando aparece um erro de abertura porque estão com erro em blocos, fazendo com que seja possível seu acesso na maioria dos casos.
#!/bin/bash #************************************************* #*Acesso as partições do HD no GNU/Linux KDu4 * #*Elaborado pelo SuporteTecnicoID em 2014 * #************************************************* sudo umount -a && echo "" > /tmp/findLin echo "" >> /tmp/findLin echo " Partições Localizados nas HDs " >> /tmp/findLin echo " xxxxxxxxxxxxxxxxxxxxxx " >> /tmp/findLin echo " xxxxxxxxxxxxxxxxxxxxxx " >> /tmp/findLin blkid >> /tmp/findLin echo "" >> /tmp/findLin fdisk -l >> /tmp/findLin echo "" >> /tmp/findLin gmessage -geometry 690x400 -file /tmp/findLin -center -title 'Lista das Partições Linux Localizadas no KDu4' rm /tmp/findLin & PartLin=`gmessage -center -entry " Copie e cole no espaço abaixo a identificação da Partição a corrigir." -title "Partição a corrigir"` sleep 1 echo " Partições Localizados e sendo corrigidos no disco $PartLin " > /tmp/findLin echo "" >> /tmp/findLin echo "" >> /tmp/findLin xterm -bg darkblue -fg yellow -title "Verificando e corrindo erros na Partição $PartLin ....!" -e " clear echo . echo .. echo ... echo Verificando e corrigindo erros na estrutura da Partição $PartLin echo . echo .. echo ... sudo badblocks -sv -c 1024 /dev/$PartLin >> /tmp/findLin echo . echo .. echo ... sudo fsck -f -c -y -v /dev/$PartLin >> /tmp/findLin clear sleep 1" gmessage -geometry 690x400 -timeout 15 -file /tmp/findLin -center -title 'Correções Check nas Partições Linux Localizadas no KDu4' xterm -bg darkblue -fg yellow -title "Verificando e corrindo erros na Partição $PartLin ....!" -e " clear echo . echo .. echo ... echo Verificando e corrigindo erros na estrutura da Partição $PartLin echo . echo .. echo ... sudo badblocks -sv -c 1024 /dev/$PartLin >> /tmp/findLin echo . echo .. echo ... sudo fsck -f -c -y -v /dev/$PartLin >> /tmp/findLin clear sleep 1" gmessage -geometry 690x400 -timeout 15 -file /tmp/findLin -center -title 'Correções Check nas Partições Linux Localizadas no KDu4' xterm -bg darkblue -fg yellow -title "Verificando e corrindo erros na Partição $PartLin ....!" -e " clear echo . echo .. echo ... echo Verificando e corrigindo erros na estrutura da Partição $PartLin echo . echo .. echo ... sudo badblocks -sv -c 1024 /dev/$PartLin >> /tmp/findLin echo . echo .. echo ... sudo fsck -f -c -y -v /dev/$PartLin >> /tmp/findLin clear sleep 1" gmessage -geometry 690x400 -timeout 15 -file /tmp/findLin -center -title 'Correções Fix nas Partições Linux Localizadas no KDu4' rm /tmp/findLin & gdialog --title "Executando novamente o procedimento de correção!." --yesno 'Deseja executar novamente?' if [ $? = "0" ]; then sh /opt/Scripts/Progs/Painel_de_Acoes/PartLcorrect cd elif [ $? = "1" ]; then nemo & gmessage -timeout 10 -center -title "ok! A correção na Partição $PartLin foi finalizada!" " Obrigado por usar nosso Corretor! A www.indexdata.com.br e o SuporteTecnicoID - agradecem! Tente acessar agora a partição do Linux." fi
Teste de atividade e funcionamento de portas através do Nmap
Como capturar senhas de outros usuários
Baixar pdf do "slide share" sem login usando shell script
Nenhum comentário foi encontrado.
Atenção a quem posta conteúdo de dicas, scripts e tal (6)
Como Configurar um Túnel SSH Reverso para Acessar Sua Máquina Local a Partir de uma Máquina Remota
Configuração para desligamento automatizado de Computadores em um Ambiente Comercial
O mínimo que você precisa saber sobre o terminal (parte 2)
O mínimo que você precisa saber sobre o terminal (parte 1)
Como iniciar uma máquina virtual do VirtualBox automaticamente no boot do LUbuntu 18 LTS
Mudar o gerenciador de login (GDM para SDDM e vice-versa) - parte 2
Como deixar as abas do Firefox mais fininhas
Mudar o gerenciador de login (GDM para SDDM)
"Tentando" fazer com que programas rodem no Wayland e no X11
Problema ao usar monitor externo via USB-C/Display... no Ubuntu 24 (1)
Porblema com MergeList [RESOLVIDO] (10)
Melhor hospedagem em nuvem para projetos Laravel com baixo custo? [RES... (7)
[Python] Automação de scan de vulnerabilidades
[Python] Script para analise de superficie de ataque
[Shell Script] Novo script para redimensionar, rotacionar, converter e espelhar arquivos de imagem
[Shell Script] Iniciador de DOOM (DSDA-DOOM, Doom Retro ou Woof!)
[Shell Script] Script para adicionar bordas às imagens de uma pasta