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

.core files

nu2fbsd

Member


Messages: 69

#1
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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#2
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.
 

Bunyan

Active Member

Thanks: 15
Messages: 143

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

Beastie

Daemon

Thanks: 423
Messages: 2,091

#5
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.
 

rbelk

Active Member

Thanks: 55
Messages: 202

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

Code:
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.
 
Top