[NTLUG:Discuss] Getting rid of a core with a link

Greg Edwards greg at nas-inet.com
Sat Sep 10 18:01:13 CDT 2005


Russ wrote:
>>
>>Is this a link in /dev to /proc/kcore?  If so I think you better leave it
>>alone ;)  If you're thinking to getting rid of /proc/kcore, don't.
> 
> 
> First of all, thanks for the reply.
> 
> I'm afraid that while I didn't get rid of the core file (listed under
> properties as a "memory crash dump") I did do an unlink.  A friend,
> with a bit more experience, suggested that doing the unlink would be a
> good first step.  I'm somewhat new to Linux so I was surprised that I
> could not find the core file after doing the unlink.

The rm and unlink essentially do the same thing.  The unlink command is 
the real delete in Linux (*nix).  The rm command is pretty much a wrapper.

Your reading the listing information backwards.  The "core->/proc/kcore" 
says that a file entry called "core" exists, and that the file entry is a 
link to a real file called "/proc/kcore".  When you unlinked the "core" 
entry you deleted it.

> 
> 
> There are several terms in your reply that I will need to research
> (ELF, unstripped, GDB).  Your reply seems to indicate that the core
> file was part and parcel of the processing of data.

Don't worry about these until you've got more history with *nix OSes. 
OBTW, *nix refers to UNIX type operating systems like Linux, Unix, AIX, 
SunOS/Solaris, etc.

> 
> Would you suggest that I attempt to create the link again?
> 

You can, and should, recreate it.  As root

cd /dev
ls -l core

If it is not there (Linux may have recreated it) then

ln -s /proc/kcore core
ls -l core

-- 
Greg Edwards
New Age Software, Inc. - Software Engineering Services
http://www.nas-inet.com




More information about the Discuss mailing list