Xref: utzoo comp.unix.aix:394 comp.sys.ibm.pc.rt:1285 Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sun-barr!decwrl!shelby!lindy!forel!karish From: karish@forel.stanford.edu (Chuck Karish) Newsgroups: comp.unix.aix,comp.sys.ibm.pc.rt Subject: Re: rm: file exists. filesystem problem? Summary: Yes, filesystem problem. Message-ID: <6972@lindy.Stanford.EDU> Date: 8 Jan 90 20:34:00 GMT References: <82@blender.UUCP> Sender: news@lindy.Stanford.EDU (News Service) Reply-To: karish@forel.stanford.edu (Chuck Karish) Organization: Mindcraft, Inc. Lines: 40 In article <82@blender.UUCP> herb@blender.UUCP (Herb Peyerl) wrote: >I've been having a fair number of problems with my release of BNews >on my PC-RT 6150-25 running AIX 2.2.1... ># rm -r comp/sys >rmdir: file exists ># cd comp/sys ># ls -al >total 8 >drwxrwxrwx 3 news news 592 Jan 7 12:52 . >drwxrwxr-- 3 news news 800 Jan 7 12:54 .. ># cd .. ># rm -ri * >directory sys: y >sys: y >rmdir: file exists >Anyone have any ideas? The link count for sys should be 2, not 3. Bnews must have used the "link" command with superuser privileges to make an extra link to comp/sys. Use "unlink" on the directory, and you'll be able to remove its parent. It might be interesting to use "ls -i" to find out where the other link is. Use "unlink" carefully, and run "fsck" afterwards. It's easy to corrupt your filesystem with this command. It's possible on some systems to link a directory to its parent. This can put fsck into an infinite loop, a most undesirable state of affairs. >Should this be the way a unix machine should work? It's not the way a well-behaved application should work. If Bnews created the extra link without using "link", no, this is not the way a UNIX machine should work. Chuck Karish karish@mindcraft.com (415) 323-9000 karish@forel.stanford.edu