Confused file name in directory

dave at onfcanim.UUCP dave at onfcanim.UUCP
Sun Mar 1 06:35:42 AEST 1987


>) There is still another way, easier yet but more dangerous and
>) thrilling.  You cannot edit a directory, but you can edit a file.
>) And the only difference between the two is one byte.   ...
>
>Hoowie!  Is that complicated.  Sounds fun though.  I just
>unmount the partition, get out a calculator, and adb the raw
>disk.

It's most easily done as a three-step process:

1) unmount the disk, figure out where that inode lives on the disk,
   adb disk and patch the inode's "format" word to make it into a plain file.

2) mount the disk (while single user!), and edit the directory with
   adb, emacs, whatever

3) unmount the disk, patch the inode back into a directory, fsck the
   filesystem unless you have a great deal of confidence in yourself,
   then bring the machine back up.

This minimizes the possibility of clobbering something other than
the directory you want to alter.



More information about the Comp.unix.xenix mailing list