From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,2c34bb22473a2166 X-Google-Attributes: gid1020c6,public X-Google-Thread: fee84,2c34bb22473a2166 X-Google-Attributes: gidfee84,public From: timw@isac.hces.com (Timothy M. Wieman) Subject: Re: How to get the process name from a CORE file? Date: 1996/04/24 Message-ID: <1996Apr24.140805.25483@isac.hces.com>#1/1 X-Deja-AN: 151251692 references: <4l6ies$q1e@bcarh8ab.bnr.ca> <4l7eq9$aoi@nntp.Stanford.EDU> organization: PACE Health Management Systems followup-to: comp.unix.admin,comp.unix.osf.osf1 newsgroups: comp.unix.admin,comp.unix.osf.osf1 Tony Quan (quan@Xenon.Stanford.EDU) wrote: > In article <4l6ies$q1e@bcarh8ab.bnr.ca>, Kenny Chan wrote: > > > >Hi, > > > >I would like to get the process name from a core > >file. The following script runs okay on the > >HP UNIX environment: > > > >strings core |sed -n -e 6p -e 6q > > > >However, it doesn't work on the DEC Alpha running > >OSF/1. > > > >I would like to "collect" the core file on > >my DEC Alpha and change its name to > >core. and save it for > >further investigation. Any hint on how to get the > >name? > > > If you just want the name of the executable that generated the core, > the command is: > file core > Or are you looking for something else? > --Tony > quan@cs.stanford.edu Or you can just do dbx some_executable core. eg "dbx /bin/ls core" will give you an informational message telling you what program created the core. I didn't know you could use "file" to get the executable name -- pretty handy. Tim -- ------------------------------------------------------------------------ Timothy M. Wieman | PACE Health Management Systems Software Engineer | 1025 Ashworth Rd. Suite 200 Voice: 515.222.1717 timw@hces.com | West Des Moines, IA 50265 Fax: 515.222.1716