Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles; site uokvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!pur-ee!uiucdcs!uokvax!jab From: jab@uokvax.UUCP Newsgroups: net.unix-wizards Subject: Re: re: Removing a bad directory - (nf) Message-ID: <6200027@uokvax.UUCP> Date: Sun, 20-May-84 21:57:00 EDT Article-I.D.: uokvax.6200027 Posted: Sun May 20 21:57:00 1984 Date-Received: Sat, 26-May-84 10:07:50 EDT References: <635@sri-arpa.UUCP> Lines: 36 Nf-ID: #R:sri-arpa:-63500:uokvax:6200027:37777777600:1329 Nf-From: uokvax!jab May 20 20:57:00 1984 #R:sri-arpa:-63500:uokvax:6200027:37777777600:1329 uokvax!jab May 20 20:57:00 1984 /***** uokvax:net.unix-wizar / sri-arpa!ARPA / 7:13 pm May 15, 1984 */ The standard way to remove a bad directory is: 1. Take the system down to single-user mode (killing all user processes if System III/V). 2. Attempt to recover files from the bad directory by LSing it and moving the files elsewhere. If corruption is severe this may not be possible. Also, there may not be anything to move. 3. Determine the inode of the directory. If the directory was restored by fsck then the name (less any "#") is the inode number. A "ls -li" on the parent directory will list the inode number at the start of the line. 4. Determine the device name of the file system. 5. As root give the command "clri ". This zaps the inode into oblivion. 6. Run "sync". 7. Run "fsck" on the file system. This works on Version 7, System III/V, and BSD*. Bob Toxen Silicon Graphics ucbvax!olympus!bob /* ---------- */ Something that may be obvious to some but not to others is that between steps two and three, you MUST unmount the filesystem you're planning to modify if there is any chance at all of the inode in question being incore. The reason for this is that if it's in the inode table that the kernel keeps, the "sync" in step 6 could very well undo what step 5 helps. Jeff Bowles Lisle, IL