In Unix, how do I prevent the creation of core files?

When a program crashes in your Unix account, it sometimes creates a file named core. Unless you are a programmer doing debugging work, you can safely delete this file.

You can avoid creating core files by adding a command to one of your initialization files. The command you will need to use depends on which shell you are using. Below is a table that outlines the command and initialization file according to your shell:

Shell Initialization file Command
csh .cshrc limit coredumpsize 0
tcsh .cshrc limit coredumpsize 0
ksh .profile ulimit -c 0
bash .bash_profile ulimit -c 0

These commands will limit the size of core files to zero bytes, preventing their creation.

At Indiana University, for personal or departmental Linux or Unix systems support, see At IU, how do I get support for Linux or Unix?

This is document abdf in the Knowledge Base.
Last modified on 2017-05-16 11:52:18.

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.