Help! There's a slash '/' in my filename.

John F Haugh II jfh at rpp386.cactus.org
Wed Feb 6 00:36:49 AEST 1991


In article <MARC.91Feb4134223 at marc.watson.ibm.com> marc at arnor.uucp writes:
>An alternative is to make a new directory with the same parent as the
>bad one.  Then HARD link all the other files into the new directory.
>Then blow away the bad one.  You will probably have to unlink the bad
>directory to blow it away.  Having done that, you should fsck the file
>system to clean up.

This is a lousey idea.  By merely hard linking, and not moving, you
will have a large number of link counts which must be corrected when
the filesystem is cleaned.  The most painless method is to move all
the files and directories out of the directory with the bad entry,
unmount the filesystem, zero out the directory's i-node, fsck the
filesystem, remount, rename the new directory to the old name, then
move the file from lost+found to the new directory with a less
dangerous filename.

fsdb and adb are best left to people who already knew the answer to
this problem.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org
"I've never written a device driver, but I have written a device driver manual"
                -- Robert Hartman, IDE Corp.



More information about the Comp.unix.wizards mailing list