From owner-freebsd-hackers Mon Nov 27 07:02:12 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id HAA05455 for hackers-outgoing; Mon, 27 Nov 1995 07:02:12 -0800 Received: from luke.pmr.com (luke.pmr.com [199.98.84.132]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id HAA05450 for ; Mon, 27 Nov 1995 07:02:05 -0800 Received: (from bob@localhost) by luke.pmr.com (8.6.12/8.6.9) id JAA00582; Mon, 27 Nov 1995 09:00:43 -0600 From: Bob Willcox Message-Id: <199511271500.JAA00582@luke.pmr.com> Subject: Re: How can I remove hard links between directories? To: joerg_wunsch@uriah.heep.sax.de Date: Mon, 27 Nov 1995 09:00:43 -0600 (CST) Cc: freebsd-hackers@freebsd.org In-Reply-To: <199511270822.JAA03924@uriah.heep.sax.de> from "J Wunsch" at Nov 27, 95 09:22:05 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1086 Sender: owner-hackers@freebsd.org Precedence: bulk J Wunsch wrote: > > As A boy and his worm gear wrote: > > > > > Help! An apparently buggy version of afio that I was running has > > > created some hard links between a couple of directories on my system > > David? Didn't we nuke the ability to hard-link directories some day > in 1.1.5.1? Should we nuke this again? > > > > (2.1-STABLE) and I need to get rid of them. Unfortunately rmdir > > > simply complains that the directory is not empty (use counts on > > > these two directries is 4 rather than 2). Can someone please tell > > > me a way to fix this? > > > I can think of one admittedly ugly way to fix this: use clri to zap > > the inode associated with this troublesome directory, then run fsck > > to pick up the pieces afterwards. > > It's rather ugly. Better, use this: Thanks, though I had already written a similar program per a suggestion from Julian Elischer. Seems that SysV and AIX both have this program and I was (wrongly) thinking that something like it existed in FreeBSD. -- Bob Willcox bob@luke.pmr.com (or obiwan%bob@uunet.uu.net) Austin, TX