Is it safe to delete "core" files?

Discussion in 'Site & Server Administration' started by Love*, Sep 12, 2009.

  1. #1
    I have a bunch of these on my server, I understand it was generated from some error on my site before, & each of these "core" files are 30mb+ in size which is huge altogether..

    They are named like this: core.28761 with random numbers at the end..

    I have been scared to touch these because my site might go bonkers or something, I dunno, but now they're starting to annoy me.. So would it be ok to delete them? Is there a possibility that my site might be affected even just by a little bit if I removed these files?
     
    Love*, Sep 12, 2009 IP
  2. new

    new Peon

    Messages:
    1,433
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes, you can remove them without problem

    when a program or process crashes the memory contents are dumped in a core file, which can be analyzed by experts to see what went wrong
    deleting them won't effect your sites at all
     
    new, Sep 12, 2009 IP
    Love* likes this.
  3. Love*

    Love* Well-Known Member

    Messages:
    1,739
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    165
    Digital Goods:
    1
    #3
    Thanks so much, that's all I needed to hear. :)
     
    Love*, Sep 12, 2009 IP
  4. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #4
    Before you delete them, you may want to check when they were dated, and do this command in SSH:

    $ file core.*
     
    zacharooni, Sep 24, 2009 IP
  5. Love*

    Love* Well-Known Member

    Messages:
    1,739
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    165
    Digital Goods:
    1
    #5
    What does that do? :) & I saw when they were dated but I've already deleted them. :)
     
    Love*, Sep 24, 2009 IP
  6. cpace1983

    cpace1983 Peon

    Messages:
    58
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    For debugging purposes. Looking at the dates let you know when your application or daemon crashed.
     
    cpace1983, Sep 27, 2009 IP
  7. Love*

    Love* Well-Known Member

    Messages:
    1,739
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    165
    Digital Goods:
    1
    #7
    Yep, I figured that out when I saw them & did check the dates, but what exactly does $ file core.* do? :)
     
    Love*, Sep 27, 2009 IP
  8. cpace1983

    cpace1983 Peon

    Messages:
    58
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    If you run that against a debugger, you can basically see what went wrong when the application crashed.

    If you're not a developer, they are useless.
     
    cpace1983, Sep 28, 2009 IP
  9. MikeDVB

    MikeDVB Peon

    Messages:
    113
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It just outputs what is contained in the file for the most part, as an example:

    root@atlantis [/home/mddhost]# file .ftpquota
    .ftpquota: ASCII text
    Code (markup):
    I would personally use "ls -lh | grep file" for something similar to this:
    root@atlantis [/home/mddhost]# ls -lh | grep .ftpquota
    -rw-------   1 mddhost mddhost   11 Sep 27 00:33 .ftpquota
    Code (markup):
     
    MikeDVB, Sep 28, 2009 IP