finding which core file is generated due to system utility crash

I want to find out the all the core files in my unix system that are generated by the system utilities.

now i know how to find the files with name 'core'. but how to find the file that are specifically the result of some system util crash.

thanx in advance
eshtiaq.
eshtiaqAsked:
Who is Participating?
 
while_trueConnect With a Mentor Commented:
the command:
file core
will give you the name of the process which was crashed (on most unix/linux platforms)
0
 
tfewsterCommented:
core files are owned by the user who was running the process, so `find / -name core  -user root  -print`  might give you what you need
0
 
stefan73Connect With a Mentor Commented:
Hi while_true,
combine both:

find / name core -follow -local | xargs file

(-local avoids looping into NFS mounts)

Cheers,
Stefan
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
while_trueCommented:
Hi Stefan,

that's exactly what I wanted to propose (but didn't articulate)

Greetings
Rainer
0
 
eshtiaqAuthor Commented:
Its all gr8 but how m i going to know that this file is generated by a system util or not. a system util like cat can be invoked by any user. if cat is crashed a core file is generated. how to identify that file.

thanx guys
eshtiaq
0
 
while_trueCommented:
It's like it is described in the comments above:
You can find a core file and you can examine it with the command 'file'. This will give you a printout like

./core: core dump, generated from 'cat'

and the ownership of the file 'core' gives you the user name which was executing 'cat' when it crashed.

BTW, system utils are normally not crashing that much. Why do you need to identify core files produced by crashed system commands ?
0
 
stefan73Commented:
while_true,
> ./core: core dump, generated from 'cat'

Yes, file is basically reading out argv[0] of a core file.

Stefan
0
All Courses

From novice to tech pro — start learning today.