Removendo arquivos CORE condicionalmente

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE DICA UNIX

Dica Unix 2472 - 08 de outubro de 2006

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Removendo arquivos CORE condicionalmente

Para achar e remover arquivos core condicionalmente :

PROMPT> find ~ -name core -exec file {} ; -exec rm -i {} ;

O com ando file irá mostrar qual tipo de executável é o arquivo core e a opção -i lhe pergunta se voc quer deletar o arquivo ou não.

################# EXEMPLO ####################### PROMPT> find ~ -name core -exec file {} ; -exec rm -i {} ; /my/home/core: ELF 32-bit LSB core file of ‘netscape-commun’ (signal 3), Intel 8 rm: remove `/my/home/core'? y ————————————————————————-Para entrar: http://www.ugu.com/sui/ugu/show?tip.subscribe Para sair: http://www.ugu.com/sui/ugu/show?tip.unsubscribe Para enviar uma dica: http://www.ugu.com/sui/ugu/show?tip.today


DECLARAÇÃO: TODAS AS DICAS DE UNIX SÃO PROPIEDADE DA UNIX GURU UNIVERSE E NÃO SÃO PARA SER VENDIDAS, IMPRESSAS OU USADAS SEM O CONSENTIMENTO POR ESCRITO DA UNIX GURU UNIVERSE. TODAS AS DICAS SÃO "USADAS POR SEU PROPIO RISCO". UGU ADVERTE PARA TESTAR TODAS AS DICAS EM UM AMBIENTE QUE NÃO ESTEJA EM PRODUÇÃO.Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2006