Prevent the creation of core files in Unix
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 Get help for Linux or Unix at IU.
This is document abdf in the Knowledge Base.
Last modified on 2019-06-18 14:45:54.