Arquivos com nome “core”

0

Posso ter certeza de que os arquivos com nome core no sistema são arquivos de despejo principais? Ou como posso ter certeza de que alguns arquivos são dumps principais para excluí-los? (boas práticas são bem vindas)

    
por rook 10.01.2014 / 11:02

1 resposta

4

Or how can I be certain about some files that they are core dumps to delete them?

Use file para verificar isso. Ele imprime core file se seu arquivo for um arquivo principal: Por exemplo:

> file ./core.17511
./core.17511: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from './main'

Isso é o que o man file diz:

file tests each argument in an attempt to classify it.

The type printed will usually contain one of the words text (the file contains only printing characters and a few common control characters and is probably safe to read on an ASCII terminal), executable (the file contains the result of compiling a program in a form understandable to some UNIX kernel or another), or data meaning anything else (data is usually 'binary' or non-printable). Exceptions are well-known file formats (core files, tar archives) that are known to contain binary data.

    
por 10.01.2014 / 11:09