Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: How do I unlink directories created with ln -f? Message-ID: <3575@auspex.auspex.com> Date: 29 Jun 90 20:37:25 GMT References: <26899A74.24533@orion.oac.uci.edu> <1603@quando.quantum.de> Organization: Auspex Systems, Santa Clara Lines: 21 >Suppose it's a bug in unlink. It is. SunOS, for some unknown reason, disallows (at the system call level, not at the file system level!) *all* attempts to unlink directories, even by the super-user. >It seems really as if the only way would be a `clri' on the >inode of "dir1" and "dir2", They share the same inode; one "clri" is sufficient. >followed by a `fsck', which will remove the directories. ...and shove everything that was in them into "lost+found", with cryptic names. Unless the directory in question was empty, I'd first make another directory at the same level as the link you wanted to keep, move everything (don't forget files, other than the obvious "." and "..", with names beginning with "."!) into the new directory, then do the unmount/clri/fsck. (Don't forget the unmount.)