Cleaning up core files

When an application crashes, the kernel saves the state of the process in a core file for later analysis. This will help to determine the cause of a failure.

To avoid your hard disk being populated by unnecessary core files, you can seek and destroy those files older than 4 days:

find / -name core -atime +4 -exec rm -f \”{}\” ‘;’

To make your life easier you should add the above line to a cron job.

Leave a Reply

You must be logged in to post a comment.