Date: Sun, 26 Nov 1995 21:13:25 -0500 (EST) From: A boy and his worm gear <wpaul@skynet.ctr.columbia.edu> To: bob@luke.pmr.com (Bob Willcox) Cc: hackers@freebsd.org Subject: Re: How can I remove hard links between directories? Message-ID: <199511270213.VAA23308@skynet.ctr.columbia.edu> In-Reply-To: <199511261359.HAA01124@luke.pmr.com> from "Bob Willcox" at Nov 26, 95 07:59:32 am
next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the world, Bob Willcox had to walk into mine and say: > > Help! An apparently buggy version of afio that I was running has > created some hard links between a couple of directories on my system > (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? > > Thanks, > -- > Bob Willcox > bob@luke.pmr.com (or obiwan%bob@uunet.uu.net) > Austin, TX 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. You should probably use ls -i to find the right inode number, then unmount the filesystem and use clri to blow the offending inode away. Then you can use fsck to fix the resulting mess and remount the filesystem. Make sure you get the right inode number or you'll make a bigger mess then you'll fix. :) -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= License error: The license for this .sig file has expired. You must obtain a new license key before any more witty phrases will appear in this space. =============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511270213.VAA23308>