Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8657469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:31:40+00:00 2026-06-12T15:31:40+00:00

I am using Ubuntu 12.04 LTS. I wrote a simple program as follows to

  • 0

I am using Ubuntu 12.04 LTS. I wrote a simple program as follows to create crash

// null.c
#include<stdio.h>

int main()
{
   int *p = NULL;
   int k=*p;
   printf("%d",sizeof(0));
   return 0;
}

Now I run with “gcc -g null.c”
and then “./a.out” and the output is as expected.

Segmentation fault (core dumped)

Now I want to see the core dump file using gdb. I did the following things

  1. I checked the current directory, there is no core dump file
  2. I tried tried to change the /proc/sys/kernel/core_pattern with the content “core.%e.%p”. But i am not able to write into the file. It is saying “Fsync Failed”.
  3. I used the “sudo vi /proc/sys/kernel/core_pattern”. Still can’t write into the file.

I want to create the core dump in my current directory. What to do now?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:31:42+00:00Added an answer on June 12, 2026 at 3:31 pm

    Your real question appears to be not “where is my core dump”, but rather “how can I modify /proc/sys/kernel/core_pattern“.

    sudo bash -c 'echo core.%e.%p > /proc/sys/kernel/core_pattern'
    

    should do the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to make the switch from Windows to ubuntu (am using 12.04 LTS)
I am using ubuntu 12.04 on 64 bit machine, I have this simple C
I'm using Ubuntu and Qt Creator 4 I have a .cpp program in the
I'm using Ubuntu 10.04 LTS, and was trying to install the latest version of
I am running Ubuntu 10.04 LTS and I am using Apache 2.2.14, MySQL 5.1.61,
I'm currently using JDK 6 on a Ubuntu 10.04 LTS server. Since Oracle will
I am using ubuntu 10.04 LTS and have a android ICS device. I created
I am currently using Ubuntu 12.04 LTS. I have XAMPP installed on it. From
I'm using UnixODBC with PHP 5.2.4 on Ubuntu 8.04 LTS and trying to pull
I am using Ubuntu 12.04 LTS; python 2.7.3 is pre-installed. A bug in python

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.