.core files

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.
 
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.
 
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.
 
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.
 
Back
Top