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

Kevin Brannen kbrannen at pwhome.com
Sat Sep 10 14:34:17 CDT 2005


Russ wrote:

>I'm seeking assistance with a situation that I don't understand.
>
>I've got a core file that was created when a power outage (no UPS)
>occurred during an update of my Linux system.  Pardon my description
>if it isn't clear.  I'd like to get rid of it because it's a 2.7 mB
>file on a 8 mB hard drive.  It's owned by root and exists as link to
>/proc/kcore.
>
>This the status of the core:
>
>lrwxrwxrwx 1 root root    11 2005-09-09 09:30 core -> /proc/kcore
>
>If the core was a discrete file I could get rid of it.  It was a
>common problem on a Unix system we used at work.  For me the problem
>is that it's a link.  I don't know the consequences of doing a removal
>as I would for a file without a link and I'd rather not go through the
>whole install/update of the distro if I don't have to.
>
>The Linux manuals I have don't tell me how to dispose of this,
>including the books that are associated with the distro (Suse 9.1).  I
>find instructions in my Unix books but I'm reticent to try those
>procedures.
>
>Advice would be welcome.  Thanks in advance.
>  
>

It's just a symlink.  As you can see, it only takes up 11 bytes (and 1 
inode if that means anything to you).  So my advice is not to worry 
about it.

That being said, you could remove it.  As root, do "rm ./core" when 
you're sitting in its dir.  HOWEVER, it may be a *bad* thing to remove 
that symlink!  You don't tell us where the file is, i.e. what dir it is 
in.  If it's /dev/core or /proc/core, leave it alone.  If it's /core, 
remove it.  This is a case where context is everything. :-)  If you 
aren't sure, reply back to the list with the full path name to the 
symlink.  But I'd say you're safe just to ignore it.

BTW, do *not* attempt to remove /proc/kcore.  In fact, don't ever 
attempt to modify anything in /proc; look with "cat", but don't modify.

Kevin




More information about the Discuss mailing list