How do I unlink directories created with ln -f?
Guy Harris
guy at auspex.auspex.com
Sat Jun 30 06:37:25 AEST 1990
>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.)
More information about the Comp.unix.wizards
mailing list