How to save the core file to disk? [SOLVED]

Tom H tomh0665 at gmail.com
Tue Nov 26 15:27:52 UTC 2013


On Tue, Nov 26, 2013 at 3:01 PM, Unga <unga888 at yahoo.com> wrote:
>> From: Nils Kassube <kassube at gmx.net>
>> Sent: Tuesday, November 26, 2013 2:37 PM
>> Unga wrote:
>>>  My program Seg faults but cannot find where Ubuntu saves the core
>>>  file.
>>>
>>>  I have changed the core_pattern as follows but still no core file:
>>>  echo "core.%e.%p" > /proc/sys/kernel/core_pattern
>>
>> First you should enable writing a core file with a command like
>>
>> ulimit -c 10000
>>
>> where the number indicates the max. core size in 1kb blocks. Then you
>> find the core file in your current directory.
>>
>
> Yes, "ulimit -c 10000" worked. I in fact ran ulimit earlier, it just showed "unlimted", that's why did not change it.

To check for maximum file size (unlimited by default)

ulimit
ulimit -f

To check for maximum core file size (0 by default)

ulimit -c




More information about the ubuntu-users mailing list