🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #12241

How to unlink a directory?

#12241
From: Anton Rang
Date: Tue, 25 Apr 1989 22:37
12 lines
979 bytes
I have some directories with multiple hard links.  I'd like to remove one
of the hard links.  Sounds simple, right?  How do I do it?  Calling
unlink() returns EPERM (even as superuser)....  Thanks!

  For example:

	/abc/def/ghi is hard-linked to /abc/xxx/ghi (via ln -f)
        How to remove the /abc/def/ghi link?

[[ I believe that "fsck" is your only recourse.  See v7n120 for details on
a bug in "rename" that can unintentionally place you in this situation.
--wnl ]]
Technical Details
Message-ID: <8904061853.AA28904@cpsin3.cps.msu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: rang@cpsin3.cps.msu.edu (Anton Rang)
Newsgroups: comp.sys.sun
Subject: How to unlink a directory?
Keywords: SunOS
Message-ID: <8904061853.AA28904@cpsin3.cps.msu.edu>
Date: 25 Apr 89 22:37:20 GMT
Sender: usenet@rice.edu
Organization: Sun-Spots
Lines: 12
Approved: Sun-Spots@rice.edu
Original-Date: Thu, 6 Apr 89 14:53:24 EDT
X-Sun-Spots-Digest: Volume 7, Issue 248, message 9 of 13