• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

.core files



Messages: 69

Is there someway to put the *.core file/s in /tmp for auto deletion which are application crash files. I have used FBSD before (version 8.0) but did not see .core files, in 8.1 I am getting .core files.


Staff member

Thanks: 5,628
Messages: 25,958

An application core dump will be stored in whatever the current working directory is at that time. As far as I know you can't change that behavior.


Active Member

Thanks: 15
Messages: 143

There is a way to avoid creation of core files.
Just add string limit coredumpsize 0 to .cshrc



Thanks: 422
Messages: 2,087

Of course the easiest and fastest solution is to disable the creation of core files once and for all.
But if you insist on moving them to /tmp, you can always use crontab(1) to % find ~ -name '*.core' -exec mv {} /tmp \; or so.

If you rarely had crashes before, you probably should investigate the reason for their sudden appearance.


Active Member

Thanks: 55
Messages: 202

There is no need to add another script to root's crontab. Just add the following entry into /etc/periodic.conf.

daily_clean_disks_files="[#,]* .#* a.out *.core *.CKP .emacs_[0-9]*"
You can define what ever you want to be cleaned from your filesystem. This entry is referenced by the file /etc/periodic/daily/100.clean-disks. It is run daily.

Please create the /etc/periodic.conf file and don't edit /etc/defaults/periodic.conf file.