Hardlinked directories

William Roberts liam at cs.qmw.ac.uk
Tue Jul 3 05:10:51 AEST 1990


Tut, tut - you shouldn't do that!  That is I presume a SysV
hangover since the Berkeley systems respect the file system
abstraction and provide actual system calls to manipulate
directories.

Anyway, find the inode number of a directory containing the one
of your links that you'd prefer to be rid of, move everything
else out of it and then use /etc/clri to zap that parent
directory: move the contents of the linked directory as well if
both links are in the same directory, since zapping the parent
inode with clri will kill both of them.

Then reboot the machine brutally by pulling the plug or
pressing the reset button (hmm, might be an idea to sync a few
times before doing the clri). Fsck will put things back
together and fix the link count on your directory.


If the above doesn't work first time, keep attacking things
with clri until you either wipe out everything or you solve the
problem. Both are probably more fun than using fsdb (see the
manual page, it may work for you).
-- 

William Roberts                 ARPA: liam at cs.qmw.ac.uk
Queen Mary & Westfield College  UUCP: liam at qmw-cs.UUCP
Mile End Road                   AppleLink: UK0087
LONDON, E1 4NS, UK              Tel:  071-975 5250 (Fax: 081-980 6533)



More information about the Comp.unix.aux mailing list